|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
CS 537, Spring 2004, Project 2. Interface to be implmented by BrokerImplementation.
| Method Summary | |
void |
deliver(int ounces)
Accepts more metal from the refiner. |
void |
get(int[] order)
A request from a consumer. |
void |
getAmountOnHand(int[] result)
Reports on the total amount of resources held by this Broker. |
void |
swap(int what,
int ounces)
Responds to a swap request from another broker. |
| Method Detail |
public void getAmountOnHand(int[] result)
result - a vector of amounts, one for each metal, allocated
by the caller and filled in by this Broker.public void get(int[] order)
order - the number of ounces needed of each metal.
public void swap(int what,
int ounces)
what - the metal the other broker wants to swap.ounces - the number of ounces to swap.public void deliver(int ounces)
ounces - the number of ounces of this Broker's "special" metal
being delivered.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||