|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Item
An Item models an object that might be stocked in a store. Each Item has a cost.
Constructor Summary | |
Item(String name,
int cost)
Construct an Item object. |
Method Summary | |
int |
getCost()
How much does this Item cost? |
String |
getName()
What is this Item called? |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Item(String name, int cost)
name
- the nme of this Item.cost
- the cost of this Item.Method Detail |
public int getCost()
public String getName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |