O'Reilly logo

C++11 for Programmers, Second Edition by Harvey M. Deitel, Abbey Deitel, Paul J. Deitel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

23.4.7. Class BankDatabase

Class BankDatabase (Figs. 23.2623.27) models the bank’s database with which the ATM interacts to access and modify a user’s account information. The class definition (Fig. 23.26) declares function prototypes for the class’s constructor and several member functions. We discuss these momentarily. The class definition also declares the BankDatabase’s data members. We determine one data member for class BankDatabase based on its composition relationship with class Account. Recall from Fig. 23.10 that a BankDatabase is composed of zero or more objects of class Account. Line 24 of Fig. 23.26 implements data member accounts—a vector of Account objects—to implement this composition relationship. Lines 6–7 allow us to use ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required