The project must be in C++ and in console form. Write down all the shapes you can think of (both two-dimensional and three-dimensional) and form those shapes into a shape hierarchy. The heirarchy should have base class SHAPE from which class TWODIMENSIONALSHAPE and class THREEDIMENSIONALSHAPE are derived. once you have developed the hierarchy, define each of the classes in the hierarchy. Modify the hierarchy so that class SHAPE is an abstract base class containing the interface to the hierarchy. Derive TWODIMENSIONALSHAPE and THREEDIMENSIONALSHAPE from class SHAPE (these classes should also be abstract). Use a VIRTUAL PRINT function to output the type and dimensions of each class. Also include VIRTUAL AREA and VOLUME functions, so these calculations can be performed for objects of each concrete class in the hierarchy. Derive concrete classes SQUARE and CIRCLE from class TWODIMENSIONALSHAPE and concrete classes CUBE and SPHERE from class THREEDIMENSIONALSHAPE. Also include a main driver to test these implementations.
## Deliverables
The project must be in C++ and in console form. Write down all the shapes you can think of (both two-dimensional and three-dimensional) and form those shapes into a shape hierarchy. Your heirarchy should have base class SHAPE from which class TWODIMENSIONALSHAPE and class THREEDIMENSIONALSHAPE are derived. once you have developed the hierarchy, define each of the classes in the hierarchy. Modify the hierarchy so that class SHAPE is an abstract base class containing the interface to the hierarchy. Derive TWODIMENSIONALSHAPE and THREEDIMENSIONALSHAPE from class SHAPE (these classes should also be abstract). Use a VIRTUAL PRINT function to output the type and dimensions of each class. Also include VIRTUAL AREA and VOLUME functions, so these calculations can be performed for objects of each concrete class in the hierarchy. Derive concrete classes SQUARE and CIRCLE from class TWODIMENSIONALSHAPE and concrete classes CUBE and SPHERE from class THREEDIMENSIONALSHAPE. In your driver create a Circle object named “circle??, a Square object named “square??, a Sphere object named “sphere??, and a Cube object named “cube??; then, add the following code: Shape *pShapes[4] = { &circle, &square, &sphere, &cube}; for(int i = 0; i < 4; i++) pShapes[i]->print(); cout << endl; TwoDimensionalShape *p2DShapes[2] = { &circle, &square }; for(i = 0; i < 2; i++){ p2DShapes[i]->print( ); cout << "Area = " << p2DShapes[i]->area( ) << endl << endl; } ThreeDimensionalShape *p3DShapes[2] = { &sphere, &cube }; for(i = 0; i < 2; i++){ p3DShapes[i]->print( ); cout << "Area = " << p3DShapes[i]->area( ) << endl; cout << "Volume = " << p3DShapes[i]->volume( ) << endl << endl; } Math formulas for project: Square_Area = Side_Length * Side_Length Circle_Area = 3.14159 * Circle_Radius * Circle_Radius Cube_Area = 6 * Side_Length * Side_Length Cube_Volume = Side_Length * Side_Length * Side_Length Sphere_Area = 4.0 * 3.14159 * Sphere_Radius * Sphere_Radius Sphere_Volume = 4.0/3.0 * 3.14159 * Sphere_Radius * Sphere_Radius * Sphere_Radius ------------------------------------------------------ I need a complete and fully-functional working program in executable form as well as complete source code of all work done, and DETAILED DOCUMENTATION in headers of functions/classes. Complete copyrights to all work purchased.
## Platform
Windows (95, 98, Me, NT)
## Deadline information
I need this program done and submitted to me by 2PM EST on Friday, April 19, 2002. I need DAILY updates on this project if it will take more than a day to complete it.