The world of shapes is much richer than the shapes included in the inheritance hierarchy . Write down all the shapes you can think of—both two-dimensional and three-dimensional—and form them into a more complete Shape hierarchy with as many levels as possible. Your hierarchy should have the base-class Shape from which class TwoDimensionalShape and class ThreeDimensionalShape are derived. [Note: You do not need to write any codefor this exercise.] We’ll use this hierarchy to process a set of distinct shapes as objects of base-class Shape. (This technique, called polymorphism)

What will be an ideal response?

Computer Science & Information Technology

You might also like to view...

Format Painter is located in the:

A) Editing group on the HOME tab. B) Editing group on the DESIGN tab. C) Clipboard group on the HOME tab. D) Clipboard group on the DESIGN tab.

Computer Science & Information Technology

Java limits the number of dimensions an array can have to four.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology