All Packages Class Hierarchy This Package Previous Next Index
Class atm.transaction.Withdrawal
java.lang.Object
|
+----atm.transaction.Transaction
|
+----atm.transaction.Withdrawal
- public class Withdrawal
- extends Transaction
Representation for a cash withdrawal transaction
-
amount
- Amount of money to withdraw
-
from
- Account to withdraw from
-
Withdrawal(ATM, Session, Card, int)
- Constructor
-
completeTransaction()
- Complete an approved transaction
-
getSpecificsFromCustomer()
- Get specifics for the transaction from the customer
from
private int from
- Account to withdraw from
amount
private Money amount
- Amount of money to withdraw
Withdrawal
public Withdrawal(ATM atm,
Session session,
Card card,
int pin)
- Constructor
- Parameters:
- atm - the ATM used to communicate with customer
- session - the session in which the transaction is being performed
- card - the customer's card
- pin - the PIN entered by the customer
getSpecificsFromCustomer
protected Message getSpecificsFromCustomer() throws CustomerConsole. Cancelled
- Get specifics for the transaction from the customer
- Returns:
- message to bank for initiating this transaction
- Throws: CustomerConsole. Cancelled
- if customer cancelled this transaction
- Overrides:
- getSpecificsFromCustomer in class Transaction
completeTransaction
protected Receipt completeTransaction()
- Complete an approved transaction
- Returns:
- receipt to be printed for this transaction
- Overrides:
- completeTransaction in class Transaction
All Packages Class Hierarchy This Package Previous Next Index