Now that we’ve seen class
Account in action (Fig. 3.1), we present class
Account’s details. Then, we present a UML diagram that summarizes class
Account’s attributes and operations in a concise graphical representation.
Account (Fig. 3.2) contains a
name data member that stores the account holder’s name. A class’s data members maintain data for each object of the class. Later in the chapter, we’ll add a
balance data member to keep track of the money in each
Account also contains member function
setName that a program can call to store a name in an
Account object, and member function
getName that a program can call to obtain ...