ch7.catalogAddress
Class ShoppingCart<Item>
java.lang.Object
ch7.catalogAddress.ShoppingCart<Item>
public class ShoppingCart<Item>
- extends java.lang.Object
|
Constructor Summary |
ShoppingCart()
Creates a new instance of ShoppingCart |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShoppingCart
public ShoppingCart()
- Creates a new instance of ShoppingCart
resetItems
public void resetItems()
setItems
public void setItems(java.util.List<Item> items)
getItems
public java.util.List<Item> getItems()
addItem
public void addItem(Item item)
setTotal
public void setTotal(double total)
getTotal
public double getTotal()
setCount
public void setCount(int count)
getCount
public int getCount()
addTotal
public void addTotal(double amount)
getTotalAsCurrency
public java.lang.String getTotalAsCurrency()
incrCount
public void incrCount()