To Depict Generalization and Inheritance
Generalization is the relationship between a class and one or more refined versions of this class. The class being refined is named the superclass and each refined version is named the subclass. The attributes and operations of the superclass can be exhibited in its subclasses, as a result, each subclass is said to inherit the features of the superclass. You can organize classes by using inheritance to share common structure. A generalization link means that a class can inherit an array of attributes and operations from the parent class.
1. From the Basic section of the Modeling Palette, select the Generalization icon .
2. Click inside the ATM class element, and then click the EntryStation class element.
The Select Methods to Redefine dialog box appears.
3. Select the checkbox next to the ATM node to select all the methods and click OK.
The selected methods are added to the ATM class element and a generalization link snaps in place between the two class elements.
4. Draw another generalization link by first clicking CashierStation, and then clicking EntryStation.
5. In the Select methods to Redefine dialog box, select the checkbox next to the CashierStation node to select all methods and click OK.
6. Right-click anywhere in the Diagram editor to deselect the Generalization icon.
7. Your finished diagram should look similar to the following figure.