|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objecteos.good.Good
eos.good.Capital
public class Capital
Capital stock
Field Summary |
---|
Fields inherited from class eos.good.Good |
---|
quantity |
Constructor Summary | |
---|---|
Capital(int quantity,
int ownerID,
CFirm[] producers)
Create a new capital stock initialized with quantity of machines. |
Method Summary | |
---|---|
void |
add(int qty,
double price,
int life,
CFirm producer)
Add qty of machines produced by producer, with a per-step price of price and can be used for a maximum of life number of steps |
int |
decrease(int amount)
Override, not implemented |
double |
getPresentValue()
Return the present value of all machines |
void |
increase(int amount)
Override, not implemented |
double |
useCapital()
Use the machines. |
Methods inherited from class eos.good.Good |
---|
decrease, getName, getQuantity, increase |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Capital(int quantity, int ownerID, CFirm[] producers)
quantity
- initial quantity of machinesownerID
- ID of the ownerproducers
- array of all CFirmsMethod Detail |
---|
public void increase(int amount)
amount
- public int decrease(int amount)
amount
-
public void add(int qty, double price, int life, CFirm producer)
qty
- quantity of machines to addprice
- per-step price of one machinelife
- max number of steps the machines could be used forproducer
- CFirm that produces these machinespublic double getPresentValue()
public double useCapital()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |