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

UML Relationship Symbols

Solid

Triangle

Interface Implementation

UML Relationship Symbols

Dotted

Triangle

Aggregation

UML Relationship Symbols

Solid

Diamond

Dependency

UML Relationship Symbols

Dotted

Open

Dependencies between objects are described by a dependency diagram. Figure 5 is a typical example.

UML Class Diagram for the ATM Simulation

Figure K.5. UML Class Diagram for the ATM Simulation

State diagrams are used when an object goes through a discrete set of states that affects its behavior (see Figure 6).

UML State Diagram for the ATM Class

Figure K.6. UML State Diagram for the ATM Class

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.39.144