5.4. Documenting Classes and Attributes

5.4.1. Diagramming Classes and Attributes

Figure 5.4 shows how classes are shown on a class diagram as boxes divided into three compartments.

Class name.

The top compartment identifies the class: It contains the class's name along with an optional number and abbreviation (“key letters”). UML, as opposed to Executable UML, allows only for the class name.

Class number.

A class may have a sequential number that provides the ordering for the descriptions. This is optional and some tools may provide an option to suppress its display.

Class abbreviation (key letters).

A class may have a small abbreviation used as a shorthand to refer to the class, especially in class actions. By using the abbreviation, we can ...

Get Executable UML: A Foundation for Model-Driven Architecture 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.