


Also, note that the role name at the Book end and the Adult Book end is not inherited. We also added new attribute and operations on the Book subclasses. As previously discussed, we did not have to show these as the association would be inherited naturally. We show that this feature is inherited in A dult Book by showing ^author: Person on the end of the association. We show that this feature is also inherited in Juvenile Book by showing ^author: Person. On Book, we also added another property, that of author: Person. Modelers often grayed out the feature name to indicate that it was inherited. In earlier versions of UML, there was no (^) notation to indicate inherited features. However, you can have each subclass use its own triangle, and the direction can be in any orientation, subject to considerations on readability. We normally draw the generalization triangle pointing up and have all the subclasses sharing the same triangle in a tree-like shape. For substitution to work, all the features of the superclass (e.g., attributes, operations, constraints, signals, receptions, and association) that are available on the superclass must also be available on the subclass. The specialization relationship allows a subclass (the bottom end) to substitute for the superclass (the end with the arrowhead). Structure Diagrams and Behavior Diagrams are children of DiagramĪ Diagram is a parent of Structure Diagram and Behavior Diagram We might read the top relationships of this diagram as:Ī Structure Diagram is a kind of (or sort of) DiagramĪ Structure Diagram is a specialization of a DiagramĪ Diagram is a generalization of Structure Diagram and Behavior Diagram
