(Abstract Base Classes) Suggest one or more levels of abstract base classes for the Shape hi- erarchy discussed in this chapter and shown in Fig. 12.3. (The first level is Shape, and the second level consists of the classes TwoDimensionalShape and ThreeDimensionalShape.)

What will be an ideal response?


In the Shape hierarchy, class Shape could be an abstract base class. In the second level of the hierarchy, TwoDimensionalShape and ThreeDimensionalShape could also be abstract base classes, as defining a function such as draw does not make sense for either a generic two-dimensional shape or a generic three-dimensional shape.

Computer Science & Information Technology

You might also like to view...

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

1) A Grid is a type of layout container. 2) Every XAML document must define the presentation XAML namespace and the standard XAML namespace. 3) The StartupUri attribute defines which XAML document loads first. 4) It&'s a good practice to use ranges for the size and relative location for the position of WPF controls. 5) Flow-based layouts allow the GUI to display correctly when the user resizes the window.

Computer Science & Information Technology

If you misspell a function or a named range, you will get a(n) ________ error

A) #N/A B) #REF! C) #NAME? D) #VALUE!

Computer Science & Information Technology

Who answers technology-related questions in person, on the phone, or via email?

A. help desk specialist B. computer technician C. technical project manager D. network administrator

Computer Science & Information Technology

_____ knowledge is hard to measure and document and typically is not objective or formalized.

A. Tacit B. Shared C. Technical D. Explicit

Computer Science & Information Technology