Question: write a c++ program that prompts the user for the radius of a circle and calculates and displays the area. - create a class, Circle

write a c++ program that prompts the user for the radius of a circle and calculates and displays the area.

- create a class, Circle : has a private data member 'radius' of type double

- in main()

1. instantiate an object of class Circle

2. prompt the user to enter the radius of a circle, store this value in the instantiated object -- how?

3. call a global function that calculates and returns the area of a circle using the Circle object as the argument for the function call

4. display the radius and the area of the circle

This shouldn't be complicated

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!