Modeling Classes

The UML enables us to model, via class diagrams, the ATM system’s classes and their interrelationships. Figure 22.6 represents class ATM. Each class is modeled as a rectangle with three compartments. The top compartment contains the name of the class, centered horizontally and in boldface. The middle compartment contains the class’s attributes. (We discuss attributes in Section 22.5 and Section 22.6.) The bottom compartment contains the class’s operations (discussed in Section 22.7). In Fig. 22.6 the middle and bottom compartments are empty, because we’ve not yet determined this class’s attributes and operations.

Image

Fig. 22.6. Representing ...

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.