Write down all the shapes you can think of - both 2 dimensional and 3 dimensional and form these shapes into a shape hierarchy. Your shapes should have a base class called shape from which Class
TwoDimensionalShape and Class
ThreeDimensionalShape are derived. Once you have developed the hierarchy, define each of these classes in the hierarchy. You are going to be using a technique called polymorphism as you modify the hierarchy so that class Shape is an abstract base class containing the interface to the hierarchy. Derive Class
TwoDimensionalShape and Class
ThreeDimensionalShape - - these classes should also be abstract. Use a
virtual print function to outcome the type and dimension of each class. Also include
virtual area and
virtual volume functions so these calculations can be performed for objects of each concrete class in the hierarchy. Write a driver program that tests the
Shape class hierarchy.