23.4.9. Class BalanceInquiry
BalanceInquiry (Figs. 23.30–23.31) derives from abstract base class
Transaction and represents a balanceinquiry ATM transaction.
BalanceInquiry does not have any data members of its own, but it inherits
Transaction data members
bankDatabase, which are accessible through
public get functions. Line 6
#includes the definition of base class
BalanceInquiry constructor (declared in line 11 of Fig. 23.30 and defined in lines 8–13 of Fig. 23.31) takes arguments corresponding to the
Transaction data members and simply forwards them to
Transaction’s constructor, using base-class initializer syntax (line 10 of Fig. 23.31). Line 12 of Fig. 23.30 contains the function ...