Chapter 3 Building Structural Diagrams
A generalization is a relationship between a general element (the parent) and a more specific element (the child). The more specific element is fully consistent with the general element and contains additional information.
A generalization can be created in the following diagrams:
You create a generalization relationship when several objects have common behaviors. You can also create a generalization between a shortcut of an object and an object but, if the link is oriented, only the parent object can be the shortcut.
In a use case diagram, you can create a generalization between:
For example two or more actors may have similarities, and communicate with the same set of use cases in the same way. This similarity is expressed with generalization to another actor. In this case, the child actors inherit the roles, and relationships to use cases held by the parent actor. A child actor includes the attributes and operations of its parent.
In a class diagram, you can create a generalization between:
For example, an animal is a more general concept than a cat, a dog or a bird. Inversely, a cat is a more specific concept than an animal.
Animal is a super class. Cat, Dog and Bird are sub-classes of the super class.
In a component diagram, you can create a generalization between two components, as shown below:
Copyright (C) 2006. Sybase Inc. All rights reserved. |