O'Reilly logo

C++ How to Program, Sixth Edition by H. M. Deitel - Deitel & Associates, Inc., P. J. Deitel - Deitel & Associates, Inc.

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

Appendix G. ATM Case Study Code

ATM Case Study Implementation

This appendix contains the complete working implementation of the ATM system that we designed in the Software Engineering Case Study sections found at the ends of Chapters 17, 9 and 13. The implementation comprises 877 lines of C++ code. We consider the classes in the order in which we identified them in Section 3.11:

  • ATM

  • Screen

  • Keypad

  • CashDispenser

  • DepositSlot

  • Account

  • BankDatabase

  • Transaction

  • BalanceInquiry

  • Withdrawal

  • Deposit

We apply the guidelines discussed in Section 9.11 and Section 13.10 to code these classes based on how we modeled them in the UML class diagrams of Fig. 13.28 and Fig. 13.29. To develop the definitions of classes’ member functions, we refer to the activity diagrams presented ...

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