public class Withdrawal extends Transaction
| Constructor and Description |
|---|
Withdrawal(int accountNumber,
Screen screen,
BankDatabase bankDatabase,
Keypad keypad,
CashDispenser cashDispenser)
Calls superclass Transaction to initialize the account number, screen and
bank database objects for this transaction and then sets the keypad and
cash dispenser objects to the values from the parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Performs the withdrawal transaction.
|
getAccountNumber, getBankDatabase, getScreenpublic Withdrawal(int accountNumber,
Screen screen,
BankDatabase bankDatabase,
Keypad keypad,
CashDispenser cashDispenser)
accountNumber - the user-specified account number for this transactionscreen - a reference to the output screenbankDatabase - a reference to the bank database of user account objectskeypad - a reference to the the keypad for the withdrawal amountcashDispenser - a reference to the cash dispenser for the withdrawalpublic void execute()
execute in class Transaction