Let me just state here that I am not looking for code. I am merely looking for help understanding the problem.
Okay. I am the unofficial tutor of a couple of people. And today they got their midterm assignment for C++. And as usuall, its rather hard to understand what the professor wants. Perhaps someone on here can help me shed some light on what is needed. Here is the assignment, word for word:
So...could someone please translate what this professor wants?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.