Question: The class will have the following member functions: 1. Default Constructor that sets the radius to 0.0 (even though the program does not use it)

 The class will have the following member functions: 1. Default Constructorthat sets the radius to 0.0 (even though the program does not

The class will have the following member functions: 1. Default Constructor that sets the radius to 0.0 (even though the program does not use it) 2. A Constructor that accepts the radius of the circle as an argument (the program will use this) 3. setRadius - a mutator function for the radius variable 4. getRadius - an accessor function for the radius variable 5. getArea returns the area of the circle (area =pi radius radius) 6. getDiameter returns the diameter of the circle ( diameter = radius 2 ) 7. getCircumference - returns the circumference of the circle (circ =2 pi radius) Requirements: Write a program that demonstrates the circle class by prompting the user for the circle's radius (with input validation), create a circle object using the overloaded constructor, and then report the area, diameter, and circumference with the output precision set to (2) two decimal places. Use a separate header file for the class. Add a UML Diagram for the class as a comment below main (10\%). The program will: - Use a separate *.h file for the class and a *.cpp file for main. - Use 3.14159 as the value for pi - Include \#ifndef and \#endif directives as required - Have a UML diagram of the Class with access specifiers, parameters, and return types (ref Figure 13-22 pg 826) as a comment below main. Grading will be based on meeting all of the lab requirements, adherence to programming standards, operation and accurate output, and programming style including white space and indentation. Assignments submitted after the due date will incur a grade penalty of three (3) points per day after the first day, and will not be accepted more than one (1) week late. CSE 112 Introduction to Computer Science II Sample Main: // Chapter 13, Programming Challenge 8: Circle Class int main () {doubleradius=0;//Toholdaradius//Gettheradius.while(radius>radius;if(radius

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!