ATM Simulation Code

C++ Implementation

The implementation of the ATM simulation in C++ consists of four modules that declare and implement the various classes - each consisting of an interface (.h) file that contains the class declaration(s) and an implementation (.cc) file that implements the methods declared in the interface - plus a main program module (main.cc).

The current version of these files has been compiled and run on both a VAX/VMS system and a Linux system, both using gnu C++. A complete downloadable package of the all the source code will eventually be available via anonymous ftp. The README file in that package contains information about system specific details.

Files that Implement the Various Classes, Plus Main Program

InterfaceImplementation Purpose
atm.h atm.ccATM itself
atmparts.h atmparts.cc Component parts of ATM
session.h session.ccPerform a customer session
transaction.h transaction.ccPerform a transaction
bank.h bank.ccManage communication with bank
(None)main.ccMain program

The implementation file atmparts.cc contains very system-specific code for displaying some likeness of an ATM. Frankly, some of it is pretty ugly! For this reason, no link to this file is available (though it is included in the complete downloadable package.)

The implementation of class Bank is very simple and also fairly ugly - i.e. card numbers and PINs are hardwired in, etc. For this reason, no link to this file is available (though it is included in the complete downloadable package.) It is intended that a more realistic implementation be left as an exercise to the student.

[ Intro ] [ Requirements ] [ Domain Objects ] [ Use Cases ] [ CRC Cards ] [ Class Diagram ]
[ Class Description Forms ] [ Operation Description Forms ] [ Code ] [ Executable ]

Copyright © 1996 - Russell C. Bjork. Permission for non-commercial reproduction for educational use is hereby granted; all other rights are reserved.