Generalization & specialization relationships can be expressed in a UML class diagram by drawing a solid line with a hollow-tipped arrow from the derived class to the base class as figure 11-2 illustrates.
Figure 11-2: UML Class Diagram Showing DerivedClass Inheriting From BaseClass
Referring to figure 11-2 — the BaseClass class acts as the direct base class to DerivedClass. Behavior provided by BaseClass is inherited by DerivedClass. Let’s take a look at an example program that implements these two classes.