Question: Circle Class (Complete) Copy the finished CircleClassSeparate project folder with the separate Circle.h and Circle.cpp modules Name the copied folder Assign02-CircleClass. Add two new member

 Circle Class (Complete) Copy the finished CircleClassSeparate project folder with theseparate Circle.h and Circle.cpp modules Name the copied folder Assign02-CircleClass. Add two

Circle Class (Complete) Copy the finished CircleClassSeparate project folder with the separate Circle.h and Circle.cpp modules Name the copied folder Assign02-CircleClass. Add two new member functions to the Circle class: double getcircumference(); // accessor member function getCircumference() void displayCircleInfo(string); // display Circle information with string parameter These two function prototypes belong in Circle.h. Add the implementation of these functions to Circle.cpp Be sure to add a preprocessor directive for the string class (to support the new string parameter) in Circle.h #pragma once #include using namespace std; class Circle add directive to use string class parameter " std namespace required to access string class routines public: Circle); Circle (double r); double getRadius() double getDiameter() double getArea() double getcircumference() const; void setRadius (double r) void displaycircleInfo(string) const; I display Circle information with string label parameter /I default constructor (no-argument constructor) // constructor with radius parameter /l accessor member functions const; const; const; // accessor member function // mutator member function getCircumference() private: double radius // data member (private) 3; The circumference value is calculated by multiplying the diameter of the circle by the value of pi (3.14159) Use either a call to getDiameter) in the calculation or multiply the private data member radius by 2 The Circle.cpp implementation file includes the code to return the correct value of getCircumference0 The displayCirclelnfo(string) function accepts a string parameter passing the name of the current circle object to the output routine. Add these preprocessor directives to Circle.cpp to support display output #include #include -.-required for cout object used by displayCircleInfo() needed for fixed setprecision(2) setw(8) operators Implementation of the displayCircleInfo(string) routine should include this output directive in order to display all floating-point values that follow with exactly two digits to the right of the decimal: cout

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!