7.5. Generalization Hierarchies

An instance of a superclass always requires an instance of a subclass and vice versa. Consequently, the creation or deletion of an object classified as a leaf subclass, which implies all the object's parents, creates or deletes the instance of that subclass and all of its parent classes.

The syntax is the same as that of creating and deleting objects that are not in generalization hierarchies, except that in addition, an object may be a member of multiple hierarchies. Consequently, the object creation must list all the classes of which the object is a member, as indicated in Figure 7.11. Figure 7.12 shows some examples.

Figure 7.11. Creation, Deletion, and Reclassification in Hierarchies
Figure 7.12. Examples of ...

Get Executable UML: A Foundation for Model-Driven Architecture now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.