|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.inf111.dvdvendor.gui.Actions
public class Actions
This class contains the actions that can be called from the Graphical User Interface of the DVD Vendor System. It also includes an internal action to print the contents of the shopping cart
Constructor Summary | |
---|---|
Actions()
|
Method Summary | |
---|---|
protected Product |
addDVD(DVDVendor dvdVendor,
java.lang.String barCodeNumber)
Method that creates a new BarCode object with the barCodeNumber given as parameter, then it adds the BarCode to the DVDVendor object. |
protected java.lang.String |
calculateCharges(DVDVendor dvdVendor,
java.lang.String barCode)
Method that calculates the charges for the returned product |
protected java.lang.String |
dispenseItems(DVDVendor dvdVendor)
Method that dispense the items in the transaction using the dvdDispenser object from the dvdVendor object |
protected DVDVendor |
initiateRent()
Method that initiates the Rent Transaction |
protected DVDVendor |
initiateReturn()
Method that initiates the Return Transaction |
protected void |
payItems(DVDVendor dvdVendor,
java.lang.String cardNumber)
Method that collects the payment for all the products in the cart |
protected java.lang.String |
printShoppingCart(java.util.Enumeration<Product> listItemsInCart)
Method that prints the contents of the shopping cart This method is called internally for the GUI class and does not correspond to any external GUI action |
protected void |
receiveItem(DVDVendor dvdVendor,
java.lang.String barCode)
Method that receives the returned item using the dvdDispenser object from the dvdVendor object |
protected DVDVendor |
start()
Method that creates a new DVD Vendor object that includes dvdDispenser, paymentCollector, productDB, and transactionDB objects |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Actions()
Method Detail |
---|
protected DVDVendor start() throws java.lang.Exception
java.lang.Exception
protected DVDVendor initiateRent() throws java.lang.Exception
java.lang.Exception
protected DVDVendor initiateReturn() throws java.lang.Exception
java.lang.Exception
protected Product addDVD(DVDVendor dvdVendor, java.lang.String barCodeNumber) throws java.lang.Exception
dvdVendor
- DVDVendor object where the product will
be addedbarCodeNumber
- String that contains the bar code
java.lang.Exception
protected java.lang.String dispenseItems(DVDVendor dvdVendor) throws java.lang.Exception
dvdVendor
- DVDVendor object for the transaction
java.lang.Exception
protected void receiveItem(DVDVendor dvdVendor, java.lang.String barCode) throws java.lang.Exception
dvdVendor
- DVDVendor object for the transactionbarCode
- String with the bar code of the returned item
java.lang.Exception
protected void payItems(DVDVendor dvdVendor, java.lang.String cardNumber) throws java.lang.Exception
dvdVendor
- DVDVendor object for the transactioncardNumber
- String with the credit/debit card Number that will be used to
charge the cost of the transaction
java.lang.Exception
protected java.lang.String calculateCharges(DVDVendor dvdVendor, java.lang.String barCode) throws java.lang.Exception
dvdVendor
- DVDVendor object for the transactionbarCode
- String with the bar code of the returned item
java.lang.Exception
protected java.lang.String printShoppingCart(java.util.Enumeration<Product> listItemsInCart) throws java.lang.Exception
listItemsInCart
- Enumeration of Products that are in the
shopping cart
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |