This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Lab 11: Mini ATM Last Modified 12/17/2008 Key Concept: do...while loop, nesting structures, preview of methods Write a program that handles many transactions at an ATM. Part I: Menu System [16 pts.] Start with a default balance of your choosing (i.e. how much was in the user's account). Use a CONSTANT for this and declare it globally. Present the user with a menu that looks like this: Enter an option: (W)ithdraw (D)eposit (B)alance Inquiry (Q)uit Use a switch structure to implement the menu. If the user asks to withdraw or deposit, ask for an amount and output a new balance. You'll need to keep track of the balance between transactions in doing so. You should treat lowercase options as valid, but you should also print out an error message for an invalid options. You don't need to worry about formatting the number of decimals in the output. The menu should run constantly until the user selects the 'Q' option. Use a do...while loop....
View Full Document
- Fall '10