Class Item
java.lang.Object
Item
- public class Item
- extends Object
An Item models an object that might be stocked in a store.
Each Item has a cost.
- Version:
- 1
Constructor Summary |
Item(int itemCost)
Construct an Item object. |
Method Summary |
int |
getCost()
How much does this Item cost? |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Item
public Item(int itemCost)
- Construct an Item object.
- Parameters:
itemCost
- the cost of this Item.
getCost
public int getCost()
- How much does this Item cost?
- Returns:
- the cost.