Question: Write a class called Sphere which has the following data members: A double variable called Radius to denote the radius of the sphere. The class

Write a class called "Sphere" which has the following data members: A double variable called "Radius" to denote the radius of the sphere. The class should have the following function members: A default constructor which sets the radius to a default value of 1.0 An explicit value constructor 5 accessor functions namely getRadmsQ, getDiameter(), getCircumference(), getAreaQ, getVolume() which returns the respective statistics of the sphere. A mutator function to set the value of the data member A display function which displays the radius, diameter, volume and area of the sphere on the output object specified by the programmer. This function also acts as a helper function in overloading the "
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
