Class Consumer
Object
Consumer
- All Implemented Interfaces:
- IBM, Runnable
- public class Consumer
- extends Object
- implements Runnable, IBM
CS 537, Spring 2004, Project 2.
An energy consumer.
Method Summary |
void |
getConsumption(int[] result)
Reports on the total amount consumed thus far. |
void |
run()
Main loop.
|
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Consumer
public Consumer()
getConsumption
public void getConsumption(int[] result)
- Reports on the total amount consumed thus far.
- Parameters:
result
- a vector of amounts, one for each metal, allocated
by the caller and filled in by this Consumer.
run
public void run()
- Main loop.
Repeatedly generates random orders to random brokers.
- Specified by:
run
in interface Runnable