23.4. ATM Case Study Implementation

This section contains the complete working implementation of the ATM system that we designed in Chapter 22 and this chapter. We consider the classes in the order in which we identified them in Section 22.4:

ATM

Screen

Keypad

CashDispenser

DepositSlot

Account

BankDatabase

Transaction

BalanceInquiry

Withdrawal

Deposit

We apply the guidelines discussed in Sections 23.2– and 23.3 to code these classes based on how we modeled them in the UML class diagrams of Figs. 23.10 and 23.11. To develop the definitions of classes’ member functions, we refer to the activity diagrams presented in Section 22.6 and the communication and sequence diagrams presented in Section 22.8. Note that our ATM design ...

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.