23.4.12. Test Program ATMCaseStudy.cpp

ATMCaseStudy.cpp (Fig. 23.36) is a simple C++ program that allows us to start, or “turn on,” the ATM and test the implementation of our ATM system model. The program’s main function (lines 6–11) does nothing more than instantiate a new ATM object named atm (line 8) and invoke its run member function (line 9) to start the ATM.


 1   // ATMCaseStudy.cpp
 2   // Driver program for the ATM case study.
 3   #include "ATM.h" // ATM class definition
 4
 5   // main function creates and runs the ATM
 6   int main()
 7   {
 8      ATM atm; // create an ATM object
 9      atm.run(); // tell the ATM to start
10   } // end main


Fig. 23.36. ATMCaseStudy.cpp starts the ATM system.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.21.232