Account (Figs. 23.24–23.25) represents a bank account. Lines 9–15 in the class definition (Fig. 23.24) contain function prototypes for the class’s constructor and six member functions, which we discuss shortly. Each
Account has four attributes (modeled in Fig. 23.11)—
totalBalance. Lines 17–20 implement these attributes as
private data members. Data member
availableBalance represents the amount of funds available for withdrawal. Data member
totalBalance represents the amount of funds available, plus the amount of deposited funds still pending confirmation or clearance.
1 // Account.h 2 // Account class definition. Represents a bank account. ...