    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class atm.Session

    java.lang.Object
       |
       +----atm.Session

public class Session
extends Object

Representation for one ATM session serving a single customer.

##

atm
  The ATM on which the session is performed
CHOOSING_TRANSACTION_STATE
  Asking the customer to choose a transaction type
EJECTING_CARD_STATE
  Ejecting the customer's card
FINAL_STATE
  Session finished
PERFORMING_TRANSACTION_STATE
  Peforming a transaction
pin
  The PIN entered (or re-entered) by the customer
READING_CARD_STATE
  Reading the customer's card
READING_PIN_STATE
  Asking the customer to enter a PIN
state
  The current state of the session

##

Session(ATM)
  Constructor

##

performSession()
  Perform the Session Use Case
setPIN(int)
  Change the pin recorded for the customer (if invalid pin extension was performed by a transaction

##

atm

     private ATM atm

  The ATM on which the session is performed

pin

     private int pin

  The PIN entered (or re-entered) by the customer

state

     private int state

  The current state of the session

READING_CARD_STATE

     private static final int READING_CARD_STATE

  Reading the customer's card

READING_PIN_STATE

     private static final int READING_PIN_STATE

  Asking the customer to enter a PIN

CHOOSING_TRANSACTION_STATE

     private static final int CHOOSING_TRANSACTION_STATE

  Asking the customer to choose a transaction type

PERFORMING_TRANSACTION_STATE

     private static final int PERFORMING_TRANSACTION_STATE

  Peforming a transaction

EJECTING_CARD_STATE

     private static final int EJECTING_CARD_STATE

  Ejecting the customer's card

FINAL_STATE

     private static final int FINAL_STATE

  Session finished

##

Session

     public Session(ATM atm)

  Constructor

  Parameters:
    atm - the ATM on which the session is performed

##

performSession

     public void performSession()

  Perform the Session Use Case

setPIN

     public void setPIN(int pin)

  Change the pin recorded for the customer (if invalid pin extension was performed by a transaction

  Parameters:
    pin - the newly entered pin

    All Packages  Class Hierarchy  This Package  Previous  Next  Index