Question: I need help creating a sphere class in c++ with the following specifications. I don't know too much about classes so any help is appreciated.

I need help creating a sphere class in c++ with the following specifications. I don't know too much about classes so any help is appreciated.

I need help creating a sphere class in c++ with the following

Sphere Class edikl Using a h and.cpp fe, implement a Sphere class with the following data flelds and methods. Constant Use the lolowing value for Pl- 3.14159 Dete radius: doube s color: string Methods Sphere()-default constructor . should set th radius to one and color to green . Sphero(doubler) _ custom constructor -sets the radius toand color to green Sphere double r string c) custom conistructor sets the radius to r and color to c a void setRadius doubla) mutator method used to change the radius a double getRadius) const constant function that return the radius void setColorlstring) mutaior method to sel the color of the Sphere string gelCokr) const constant accessor method that retum the color of the Sphere adouble area) const constent function that returns the surface area of the Sphere surface area = 42 . double volume()const constent function that returns the volume of the Sphere . volume=- a bool isEqusl(const Sphere other) const constant boolean function that return TRUE is two Spheres have the same radius and color, FALSE otherwise Deliverables edirl Sphere.h Sphere.cpp

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!