In this book, we use a very restricted subset of the UML notation. This appendix lists the components of the subset.
For a complete discussion of the UML notation, see The Unified Modeling Language User Guide, Grady Booch, James Rumbaugh, and Ivar Jacobson (Addison-Wesley, 2005, 1999).
CRC cards are used to describe in an informal fashion the responsibilities and collaborators for a class. Figure 1 shows a typical CRC card.
Figure 2 shows the UML notation for classes and interfaces. You can optionally supply attributes and methods in a class diagram, as in Figure 3.
Table 1 shows the arrows used to indicate relationships between classes. Multiplicity can be indicated in a diagram, as in Figure 4.
Table K.1. UML Relationship Symbols
Relationship | Symbol | Line Style | Arrow Tip |
---|---|---|---|
Inheritance | Solid | Triangle | |
Interface Implementation | Dotted | Triangle | |
Aggregation | Solid | Diamond | |
Dependency | Dotted | Open |
Dependencies between objects are described by a dependency diagram. Figure 5 is a typical example.
State diagrams are used when an object goes through a discrete set of states that affects its behavior (see Figure 6).
3.144.39.144