Draw an inheritance hierarchy for students at a university similar to the hierarchy shown in Fig. 12.2. Use Student as the base class of the hierarchy, then include classes UndergraduateStudent and GraduateStudent that derive from Student. Continue to extend the hierarchy as deep (i.e., as many levels) as possible. For example, Freshman, Sophomore, Junior and Senior might derive from

UndergraduateStudent, and DoctoralStudent and MastersStudent might derive from Graduate-Student. After drawing the hierarchy, discuss the relationships that exist between the classes.

What will be an ideal response?


This hierarchy contains many “is-a” (inheritance) relationships. An Undergraduat-
eStudent is a Student. A GraduateStudent is a Student, too. Each of the classes
Freshman, Sophomore, Junior and Senior is an UndergraduateStudent and is a Student. Each of the classes DoctoralStudent and MastersStudent is a Graduate Student and is a Student.

![14903|529x258](upload://6Uwz27mkO7osOOF3tvaqkjlVLJw.png)

Computer Science & Information Technology

You might also like to view...

____ devices receive signals transmitted by a collection of earth-orbiting satellites.

A. RFID B. Triangulation C. GPS D. Mobile locating

Computer Science & Information Technology

The error message #NULL! indicates the use of a name that Excel does not recognize.

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

Computer Science & Information Technology

By establishing a relationship, you can efficiently combine data from related tables

Indicate whether the statement is true or false

Computer Science & Information Technology

In the figure above, the number 3 refers to the _____ button.

A. Show Thumbnails B. Default Foreground and Background C. Delete Mask D. Add a Layer Mask

Computer Science & Information Technology