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
- The ATM to which this card reader belongs
-
CardReader(ATM)
- Constructor
-
ejectCard()
- Eject the card that is currently inside the reader.
-
readCard()
- Read a card that has been partially inserted into the reader
-
retainCard()
- Retain the card that is currently inside the reader for action by the
bank.
atm
private ATM atm
- The ATM to which this card reader belongs
CardReader
public CardReader(ATM atm)
- Constructor
- Parameters:
- atm - the ATM that owns this card reader
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
public void ejectCard()
- Eject the card that is currently inside the reader.
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