q :class & object

Write a C++ statement that defines a Circle object named Circle1 with radius 5.

Write a C++ statement that changes the radius of object Circle1 to 0, and write the expected output.

assuming the following statement in main : "Circle1.radius = 20 ;" Is there an error? If yes: Explain the error.
Show how can you make a changes in the given class implementation or declaration to make this statement true. ( Note : without change on the statement given in question)

i'm not understand this q can you explain plz ?
I believe you need to create a class called Circle, and Circle would have a variable in it named radius .

And you would need to write the proper constructor, and the set/get function.
Topic archived. No new replies allowed.