Question: Assignment: Right Circular Cone Class Write a program that demonstrates the Right Circular Cone class by asking the user for the radius, and height then

 Assignment: Right Circular Cone Class Write a program that demonstrates the
Right Circular Cone class by asking the user for the radius, and
height then reporting the Right Circular Cone's volume and surface area. r

Assignment: Right Circular Cone Class Write a program that demonstrates the Right Circular Cone class by asking the user for the radius, and height then reporting the Right Circular Cone's volume and surface area. r = radius h = height a = surface area v = volume Formula: (Surface area) a =r(r + Vh2 +r2 ) Volume v = air2 h 3 SPECIFICATIONS: (save it under Cone.h file) Write a Cone class that has the following member variables. radius - type double height - type double pi-type double The class should have the following public member functions. Cone setRadius copied to radius setHeight copied to height getRadius getHeight getSurfaceArea getVolume a default constructor Accepts an (type double) argument that is Accepts an (type double) argument that is returns the value in radius returns the value in height returns the surface area of the Cone returns the volume of the Cone IMPLEMENTATION: (save it under Cone.cpp file) It includes member functions: Conel) Default constructor that sets radius to 0.0, height to 0.0 and pi to 3.14159 SetRadius function that sets the radius setHeight function that sets the height getRadius- function that returns the radius getHeight- function that returns the height getSurfaceArea the right circular Cone function that returns the surface area of getArea circular Cone function that returns the area of the right Save the driver program in the file Driver.cpp. The driver program will start as: double radius; // radius of cone double height: // height of cone Conec; // Object // Get the radius from user cout> radius; cout> height; The Input screen: Enter the Cone's radius: Enter the Cone's height: Input Screen: Enter the Cone's radius: 10 Enter the Cone's height: 20.5 Sample output: (Numbers to be rounded to two digits after decimal point) Radius of the Cone: 10 Height of the Cone: 20.50 Surface Area of the Cone: 1030.72 Volume of the Cone : 2146.75

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!