// This is the final implementation of the bank control program #include "ourbank.h" // for class bank #include "ouratm.h" // for class ATM int main() { ATM moneyMachine; // Customer interface for getting transactions bank firstBank; // Collection of bankAccount objects int currentCustomer; // Set to the customer number if valid moneyMachine.message("Terminate outer loop by entering BOSS (and any PIN) after the name prompt"); while(1) { moneyMachine.getNameAndPIN(); if(moneyMachine.name() == "BOSS") break; int found; firstBank.findCustomer(moneyMachine, currentCustomer, found); if(! found) moneyMachine.message("Invalid name/pin combination"); else { while(1) { char transaction; moneyMachine.getTransaction(transaction); // Terminate inner loop if transaction is changed to 'Q' if(transaction == 'Q') break; else moneyMachine.message("D, W, and B are under construction"); } // End inner while } // End else } // End outer while return 0; } // End of function main()