Appendix K. UML Summary

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

CRC cards are used to describe in an informal fashion the responsibilities and collaborators for a class. Figure 1 shows a typical CRC card.

Typical CRC Card

Figure K.1. Typical CRC Card

UML Diagrams

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.

UML Symbols for Classes and Interfaces

Figure K.2. UML Symbols for Classes and Interfaces

Attributes and Methods in a Class Diagram

Figure K.3. Attributes and Methods in a Class Diagram

An Aggregation Relationship with Multiplicities

Figure K.4. An Aggregation Relationship with Multiplicities

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 ...

Get Big Java, 4th Edition 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.