|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object eos.good.Good
public abstract class Good
Parent class of all goods.
Field Summary | |
---|---|
protected double |
quantity
quantity of the good |
Constructor Summary | |
---|---|
Good(double quantity)
Create quantity amount of a new good |
Method Summary | |
---|---|
double |
decrease(double amount)
Decrease the quantity of the good by amount. |
java.lang.String |
getName()
Return the name of the good |
double |
getQuantity()
Return quantity of the good |
void |
increase(double amount)
Increase the quantity of the good by amount |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double quantity
Constructor Detail |
---|
public Good(double quantity)
quantity
- Method Detail |
---|
public double getQuantity()
public void increase(double amount)
amount
- public double decrease(double amount)
amount
-
public final java.lang.String getName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |