Lecture 16
11
Closing an account
•while (!(transaction = atm.readWord
•   (" transaction: ")).equals("quit")) {
•   . . .    
•   else if (transaction.equals("close")) {
•   close(acct); // private in Bank
•   break;
•    }
•}
•Require whole word “close” to close account, use “cash check” or “check”  to cash check  
•
Important points here:
•another use for break
•my change to the API in order to accommodate both “cash check” and “close” as commands. Sutdents don’t have the right to change the API, but I do. Note that I consistently require the whole word to end something – “exit”, “quit”, “close”.