|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.inf111.dvdvendor.app.Transaction
edu.uci.ics.inf111.dvdvendor.app.RentTransaction
public class RentTransaction
This class represents a Rent Transaction in the point of sale. It contains the main characteristics of a Rent Transaction and it extends the abstract class Transaction
Field Summary | |
---|---|
private java.util.ArrayList<BarCode> |
barCodes
The ArrayList of bar codes for the transaction. |
private java.lang.String |
cardNumber
The card number for the transaction. |
Constructor Summary | |
---|---|
RentTransaction()
Constructor that returns a Rent Transaction with blank values |
|
RentTransaction(java.lang.String line)
Constructor that assigns values based on the information on the TransactionDB |
Method Summary | |
---|---|
void |
addBarCode(BarCode barCode)
Method that adds a BarCode to the ArrayList of BarCodes |
java.util.ArrayList<BarCode> |
getBarCodes()
An accessor method which returns the ArrayList of BarCodes for the transaction. |
void |
setBarCodes(java.util.ArrayList<BarCode> barCodes)
An accessor method which sets the ArrayList of BarCodes for the transaction. |
java.lang.String |
toString()
Implementation of the abstract method to define the toString action. |
Methods inherited from class edu.uci.ics.inf111.dvdvendor.app.Transaction |
---|
createTransaction, getCardNumber, getCost, getDateTime, setCardNumber, setCost, setDateTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.lang.String cardNumber
private java.util.ArrayList<BarCode> barCodes
Constructor Detail |
---|
public RentTransaction()
public RentTransaction(java.lang.String line) throws InvalidBarCodeException
line
- String that represents a line in the TransactionDB file
InvalidBarCodeException
- if the BarCode read is not validMethod Detail |
---|
public void setBarCodes(java.util.ArrayList<BarCode> barCodes)
public java.util.ArrayList<BarCode> getBarCodes()
public void addBarCode(BarCode barCode)
barCode
- BarCode to be addedpublic java.lang.String toString()
toString
in class Transaction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |