Modeling Attributes

The class diagram in Fig. 22.12 lists some of the attributes for the classes in our system—the descriptive words and phrases in Fig. 22.11 helped us identify these attributes. For simplicity, Fig. 22.12 does not show the associations among classes—we showed these in Fig. 22.10. This is a common practice of systems designers when designs are being developed. Recall from Section 22.4 that in the UML, a class’s attributes are placed in the middle compartment of the class’s rectangle. We list each attribute’s name and type separated by a colon (:), followed in some cases by an equal sign (=) and an initial value.

Image

Fig. 22.12. Classes ...

Get C++11 for Programmers, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.