All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class banking.Receipt

java.lang.Object
   |
   +----banking.Receipt

public abstract class Receipt
extends Object
Abstract base class for representation of a receipt to be printed. Each specific type of transaction creates an instance of a concrete subclass of this class.


Variable Index

 o balancesPortion
Ending balances portion of the receipt - common to all forms of receipt
 o detailsPortion
Transaction details portion of the receipt - specific to each type of transaction, and therefore filled in by subclasses
 o headingPortion
Heading portion of the receipt - common to all forms of receipt

Constructor Index

 o Receipt(ATM, Card, Transaction, Balances)
Constructor.

Method Index

 o getLines()
Get the individual lines to be printed.

Variables

 o headingPortion
 private String headingPortion[]
Heading portion of the receipt - common to all forms of receipt

 o detailsPortion
 protected String detailsPortion[]
Transaction details portion of the receipt - specific to each type of transaction, and therefore filled in by subclasses

 o balancesPortion
 private String balancesPortion[]
Ending balances portion of the receipt - common to all forms of receipt

Constructors

 o Receipt
 protected Receipt(ATM atm,
                   Card card,
                   Transaction transaction,
                   Balances balances)
Constructor. This base class constructor will create the portions of the receipt that are common to all types of transaction, and the subclass constructor will create the details portion unique to each type.

Parameters:
atm - the ATM where the transaction was done
card - the card that was used
transaction - the Transaction object for the transaction
balances - Balances object giving final balances for account used

Methods

 o getLines
 public Enumeration getLines()
Get the individual lines to be printed. Each call to the nextElement() of the enumeration gets one line (as a String)


All Packages  Class Hierarchy  This Package  Previous  Next  Index