Class CashierSharingSim

java.lang.Object
  extended by CashierSharingSim
All Implemented Interfaces:
Simulation

public class CashierSharingSim
extends java.lang.Object
implements Simulation


Constructor Summary
CashierSharingSim(SampleManager s, CustomerGenerator cg, int size)
          Creates a new simulator object with a given SampleManager and CustomerGenerator, creating a Store with a specified number of lanes.
 
Method Summary
 void runStep()
          Runs one step of simulation time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CashierSharingSim

public CashierSharingSim(SampleManager s,
                         CustomerGenerator cg,
                         int size)
Creates a new simulator object with a given SampleManager and CustomerGenerator, creating a Store with a specified number of lanes. (Note that you should allocate new SampleManager and CustomerGenerator objects for each run, as they can't be "reset".)

Parameters:
s - a SampleManager to track aggregate service-time/items ratios
cg - a CustomerGenerator to model a stream of arriving customers
size - the size, in number of CheckoutLanes, of the Store to create
Method Detail

runStep

public void runStep()
Description copied from interface: Simulation
Runs one step of simulation time. In your application class, you will call this method repeatedly in a loop; when you have run the desired number of steps, you will report the aggregate data from the SampleManager you passed in to the constructor. For specifics about what occurs in one step of simulation time, refer to the assignment.

Specified by:
runStep in interface Simulation