Question: Edit, compile, and run the following programs: Create a base class called Circle for storing the radius and calculating the area of a circle.Create a
Edit, compile, and run the following programs:
Create a base class calledCirclefor storing the radius and calculating the area of a circle.Create a derived class calledCylinderwhich inherits all data members and member functions of classCircle for storing the radius in base classCircle and height and calculating the area surface area and volume of a cylinder.Include appropriate set and get methods.In the public section of theCircleclass include this code for the value of Pi:
static const double PI ;In the driver program main function create at least three Circles andor Cylinders and test all of the member functions for both classes.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
