Chapter 12: Problem 7
The world of shapes is much richer than the shapes included in the inheritance hierarchy of Fig, \(12.3 .\) Write down all the shapes you can think ofboth two- dimensional and three-dimensionaland form them into a more complete Shape hierarchy with as many levels as possible. Your hierarchy should have base class shape from which class Two imensionalshape and class ThreeDimensionalshape are derived. [Note: You do not need to write any code for this exercise.] We will use this hierarchy in the exercises of Chapter 13 to process a set of distinct shapes as objects of base-class shape. (This technique, called polymorphism, is the subject of Chapter \(13 .\).
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.