文件名称:ATM_Java_源代码(OOA、OOD设计模式)
文件大小:179KB
文件格式:ZIP
更新时间:2013-12-31 02:33:55
ATM Java OOA OOD
面有两个帐号: 帐号:1 PIN:42 帐号:2 PIN:1234 原文是如下: To run the simulation above, you need to do the following: 1.Click on the "ON" button (lower right-hand corner) to turn the ATM on. 2.Enter the number of $20 bills you want to have be in the cash dispenser at the start of the simulation when you are prompted to do so, and press RETURN 3.Perform any number of sessions, as follows: 1.Click on the "Click to insert card" button to simulate inserting a card 2.Type in the card number when you are prompted to do so (see below), and press RETURN 3.Enter the PIN associated with the card (see below). Although you can use your regular keyboard, it's more fun to click on the keys on the simulated ATM keyboard as displayed. 4.Perform any number of transactions, using your mouse to click the keys on the simulated ATM keyboard. Note that the machine will simulate ejecting your card when you indicate you do not wish to perform any more transactions (unless, of course, your card is retained due to too many invalid PINs). 4.Turn off the ATM by clicking on the "OFF" button (same position as the "ON" button". Note that you cannot turn the ATM off while in the middle of a customer session. 5.The entire simulation may be repeated as many times as you want, by turning the machine ON again. For demonstration purposes, this program uses a very simple simulation of the bank, with hardwired card numbers and PIN's, etc. The following are the available cards: Card Number PIN Available accounts 1 42 Checking account #1, Savings account #2 2 1234 Checking account #1, Money market account #3 (Note that both cards link to the same checking account) All the features of the bank work - both current and available balances (initially the same) are maintained for each account and a $300 daily withdrawal limit per card is enforced.