Class Supplier

Object
  extended by Supplier
All Implemented Interfaces:
Runnable

public class Supplier
extends Object
implements Runnable

A supplier of grains. CS 537, Spring 2007, Project 2.


Constructor Summary
Supplier(int iterations)
          Creates a new Supplier.
 
Method Summary
 Order getProduction()
          Indicates the amount of each grain delivered.
 void run()
          Main loop.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Supplier

public Supplier(int iterations)
Creates a new Supplier.

Parameters:
iterations - the number of times to iterate before terminating.
Method Detail

getProduction

public Order getProduction()
Indicates the amount of each grain delivered.

Returns:
an indication of the total amount of each grain delivered to traders thus far.

run

public void run()
Main loop. Repeatedly generates orders to random brokers.

Specified by:
run in interface Runnable