Question: C++ please!! Write a C++ program that defines the following Geometric Classes: Point Class is now a base class with the x and y coordinates.

Write a C++ program that defines the following Geometric Classes: Point Class is now a base class with the x and y coordinates. Circle Class is now derived from the Point class with a radius. Cylinder Class is now derived from the Circle class with a height. All data members in these classes must be declared as "private: In addition, display the total number objects created using the static data member variable. Add a display member function to each class that displays the attributes of the class. Add a data member which holds the class type (i.e. point,circle or cylinder). Add a static data member to each class that counts the number of objects created. In addition, provide a static member function which returns the number of objects created. Write a driver program that prompts the user to enter the desired number of geometric shapes to create with random attribute values. Number of objects not to exceed MAX_SIZE of 10. Store these objects into the appropriate arrays in the structure: struct Shapes{ Point ptArr[MAX_SIZE]; Circle cirArr[MAX_SIZE]; Cylinder cylArr[MAX_SIZE); Call the functions: displayPoints( Point ptArr[]), display Circles (Circle cirArr() and displayCylinders(Cylinder cylArr[]) which invokes the display member function of each element in the array. Random Values: x,y: random #s between 0 and 10 radius: random # between 1 and 15 height: random #s between 1 and 8
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
