![]() |
![]() |
![]() |
![]() |
![]() |
|
Consider a demonstration program that consists of five classes. The
Attraction class, along with the Movie class and
Symphony class, form a class hierarchy that extends the
Object class. The Auxiliaries and Demonstrate
classes, which stand apart from the Attraction class hierarchy, also
extend the Object class:
*-------------*
| Object |
*-------------*
^ ^ ^ extends
| | *--------------------------------------------*
| | extends |
| *----------------------* |
| extends | |
*-------------* *-------------* *-------------*
| Attraction | | Auxiliaries | | Demonstrate |
*-------------* *-------------* *-------------*
^ ^ extends
| *----------------------*
| |
*-------------* *-------------*
| Movie | | Symphony |
*-------------* *-------------*