All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class atm.physical.CardReader
java.lang.Object
   |
   +----atm.physical.CardReader
  -  public class CardReader
  -  extends Object
Manager for the ATM's card reader.  In a real ATM, this would 
  manage a physical device; in this simulation, it uses classes 
  in package simulation to simulate the device.
   
  -   atm atm
-  The ATM to which this card reader belongs
   
  -   CardReader(ATM) CardReader(ATM)
-  Constructor
  
   
  -   ejectCard() ejectCard()
-  Eject the card that is currently inside the reader.
  
-   readCard() readCard()
-  Read a card that has been partially inserted into the reader
  
  
-   retainCard() retainCard()
-  Retain the card that is currently inside the reader for action by the
  bank.
   
 atm
atm
 private ATM atm
  -  The ATM to which this card reader belongs
 
   
 CardReader
CardReader
 public CardReader(ATM atm)
  -  Constructor
   
- 
    -  Parameters:
    
-  atm - the ATM that owns this card reader
  
 
   
 readCard
readCard
 public Card readCard()
  -  Read a card that has been partially inserted into the reader
   
- 
    -  Returns:
    
-  Card object representing information on the card if read
          successfully, null if not read successfully
  
 
 ejectCard
ejectCard
 public void ejectCard()
  -  Eject the card that is currently inside the reader.
 
 retainCard
retainCard
 public void retainCard()
  -  Retain the card that is currently inside the reader for action by the
  bank.
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index