The previous chapter discussed class relationships. The two basic categories of relationship among classes are composition and inheritance. These relationships are modeled in UML diagrams, and it can be said that composition is a horizontal relationship and inheritance is a vertical relationship.
Inheritance is a mechanism provided by an object-oriented language for defining new classes from existing classes. This chapter explains the basic inheritance relationships and their applications in some detail. Inheritance enhances class reuse, that is, the use of a class in more than one application.