Design, code and execute several user-defined classes that are related by inheritance. This hierarchy will be a simple representation of two dimensional and three dimensional geometric shapes. The base class will represent a generic Shape object, derived from the base class will be a circle object and a square object, derived from the circle object will be a cylinder object, derived from the square object will be a cube object.
The class interface will be in a header file, the class implementation and the code for the main program will be in two seperate .cpp files. These files will be linked together as one executable file and then run by the CPU.
Willing to pay top $$ for promptness and complete program need ASAP!!!
**_Base Class Methods:_ SHAPE
**A default constructor that sets the default coordinate values to 1, 1.
A 2-argument constructor that accepts and processes integer values for x and y.
Operator << designed to print out the center point of the shape in [x,y] form.
**_Base Class Data:_SHAPE
**2 integers representing the x - y coordinate of a point in the Cartesian plane. This point will represent the center of the shapes in the inheritance hierarchy
**_Dervice Class Methods:_CIRCLE, SQUARE**
A default constructor that calls base class default ctor and sets the default or square data to 2.
a 3-argument constructor that calls base class 2 -argument ctor and sets double values for a circle of square
Operator << that class base class operator << and prints out circle or square data.
A method that calculates the area of a circle of square
**_Derived Class Data:_ CIRCLE,SQUARE
**double value representing radius of circle or side of square.
**_Derived Class Methods:CYLINDER, CUBE
_**A default constructor that class circle or square default ctor and sets the default cylinder data to 2.
A 4-argument constructor for cylinder that class circle 3-argument constructor and sets double value for cylinder data.
A 3-argument constructor for cube that calls square 3-argument ctor.
Operator << that class circle or square operator << and prints out cylinder data or nothing for cube.
A method that calculateds the area of a cylinder or cube.
A method that calculates the volume of a cylinder or cube.
**_Derived Class Data:_CYLINDER
**Double value representing height of a cylinder.
_**Declare at least two objects of each derived type. Use the following constructors and data at a minimum.
CIRCLE default ctor 3-arg ctor (10, 10, 3.5)
SQUARE default ctor 3-arg ctor (24, 37, 8.0)
CYLINDER default ctor 4-arg ctor (12, 25, 2.5, 5.7)
CUBE default ctor 3-arg ctor (6, 6, 4.9)
Display data for each derived object using operator <<.
Calculate and print out the area of each derived object.
Calculate and print out the volume of the cylinder and cube objects.
_**All data in the inheritance system will be ***protected*** data
Output from the shape object should look like the following.
Center = [2, 3]
Output from the processsing of the circle object and the square object should look like the following.
Center = [2, 3] Radius = 3.0
Circle Area = 28.3
Center = [2,3] Side = 4.0
Square area = 16.0
Output from the processing of the cylinder object and the cube object should look like the following.
Center = [2, 3] Radius = 3.0 Height = 5.0
Circle Area = 28.3
Center = [2, 3] Side = 4.0
Cube Area = 16.0 Cube volume = 64.0
PROGRAM MUST DO EVERYTHING STATED. I MUST BE GIVEN ALL SOURCE CODE, EXECUTABLES, AND OUTPUT. WILL PAY TOP $$ FOR PROMPTNESS AND COMPLETION, NEED ASAP!!!
Windows 98, 2000, XP
Microsoft Visual C++