All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class atm.transaction.Deposit

java.lang.Object
   |
   +----atm.transaction.Transaction
           |
           +----atm.transaction.Deposit

public class Deposit
extends Transaction
Representation for a deposit transaction


Variable Index

 o amount
Amount of money to deposit
 o to
Account to deposit to

Constructor Index

 o Deposit(ATM, Session, Card, int)
Constructor

Method Index

 o completeTransaction()
Complete an approved transaction
 o getSpecificsFromCustomer()
Get specifics for the transaction from the customer

Variables

 o to
 private int to
Account to deposit to

 o amount
 private Money amount
Amount of money to deposit

Constructors

 o Deposit
 public Deposit(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

Methods

 o 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
 o completeTransaction
 protected Receipt completeTransaction() throws CustomerConsole. Cancelled
Complete an approved transaction

Returns:
receipt to be printed for this transaction
Throws: CustomerConsole. Cancelled
if customer cancelled or transaction timed out
Overrides:
completeTransaction in class Transaction

All Packages  Class Hierarchy  This Package  Previous  Next  Index