Class Refiner
Object
Refiner
- All Implemented Interfaces:
- IBM, Runnable
- public class Refiner
- extends Object
- implements Runnable, IBM
CS 537, Spring 2004, Project 2.
A refiner of various metals.
Constructor Summary |
Refiner(int iterations)
Creates a new refiner. |
Method Summary |
void |
getProduction(int[] amt)
Indicates the amount of each resource delivered. |
void |
run()
Main loop.
|
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Refiner
public Refiner(int iterations)
- Creates a new refiner.
- Parameters:
iterations
- the number of times to iterate before terminating.
getProduction
public void getProduction(int[] amt)
- Indicates the amount of each resource delivered.
- Parameters:
amt
- a vector of amounts allocated by the caller and filled in
here with the total amounts delivered thus far.
run
public void run()
- Main loop.
Repeatedly generates orders to random brokers. After
iterations iterations, sleeps for three seconds and then
kills the entire program.
- Specified by:
run
in interface Runnable