|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--Inventory
This class maintains an inventory of UPC-coded items.
| Constructor Summary | |
Inventory()
Initialize a new Inventory manager. |
|
| Method Summary | |
void |
addItem(UPC item)
Add an item to the inventory |
int |
countItems(long code)
Count the number of items with a particular UPC that are in stock. |
UPC |
findItemByUPC(long code)
Find the first occurrence of a particular UPC coded item and return the index. |
void |
printInventory()
Print all the items in inventory |
UPC |
removeItem(long code)
Remove an item from the inventory |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Inventory()
| Method Detail |
public void addItem(UPC item)
item - the item to addpublic UPC removeItem(long code)
public int countItems(long code)
public void printInventory()
public UPC findItemByUPC(long code)
code - the UPC code to find
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||