Question: Create a Circle class and a program that uses the Circle class to instantiate a Circle object. Enter the class definition in a header file

Create a Circle class and a program that uses the Circle class to instantiate a Circle object. Enter the class definition in a header file named Circle.h. The class should include a void method that allows the program to set the Circle's radius dimension. Verify the radius is greater than 0.0 and if not, set the radius to 0.0. The class should also include a value returning method that calculates the area of the circle. You can use the value of 3.1415 for pi. The formula for area of a circle is: A=**r**r. Be sure to include a default constructor that initializes the radius to 0. Copy and paste the answer your program gives for a radius of 5.0. Also copy and paste in the contents of the program and the header file. Partial credit will be given if necessary.
Create a Circle class and a program that uses the

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 Programming Questions!