Question: in c++ Define a class ConeType for a right angle cone type. The class should have two private decimal data members: radius (r) and height

in c++

Define a class "ConeType" for a right angle cone type. The class should have two private decimal data members: radius (r) and height (h). The class has a constructor which initializes r and h to 0. The class consists of the following public member functions:

readRadius: prompts the user to enter a new value for the radius and stores it in data member r.

readHeight: prompts the user to enter a new value for the height and stores it in data member h.

showVolume: prints out a message on the screen showing the volume of the cone object.

Write a program that instantiates a cone object and allows the user to enter the base-radius (r) and the height (h) of a right angle cone and outputs its volume (v). The volume of the cone is given by the following formula:

.

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!