|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.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 to the LinkedHashSet of machines, with a total price of price, exclusive of interest, and a usable lifetime of life number of steps |
int |
getScrapped()
return number of machines scrapped this step |
double |
useCapital()
Use the machines. |
| Methods inherited from class eos.good.Good |
|---|
decrease, getName, getQuantity, increase |
| Methods inherited from class java.lang.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 CFirms| Method Detail |
|---|
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 can be used forproducer - CFirm that produces these machinespublic int getScrapped()
public double useCapital()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||