Class Store

java.lang.Object
  extended by Store

public class Store
extends java.lang.Object

The Store class models the checkout section of a grocery store; specifically, it does so by modeling an array of Lane objects. Your simulation will create a Store class and interact with it when determining which Lane to place newly-arriving Customers in.


Constructor Summary
Store(int lanes)
          Creates a Store object with the specified number of lanes; initializes each CheckoutLane to a newly-constructed CheckoutLane
 
Method Summary
 CheckoutLane getLane(int laneNum)
          Returns the CheckoutLane object with the given lane number.
 int getNumLanes()
          Returns the number of checkout lanes in this Store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Store

public Store(int lanes)
Creates a Store object with the specified number of lanes; initializes each CheckoutLane to a newly-constructed CheckoutLane

Parameters:
lanes - the number of lanes in this store.
Method Detail

getNumLanes

public int getNumLanes()
Returns the number of checkout lanes in this Store.

Returns:
the number of checkout lanes in this Store

getLane

public CheckoutLane getLane(int laneNum)
Returns the CheckoutLane object with the given lane number. Precondition: laneNum < this.getNumLanes();

Parameters:
laneNum - the lane number
Returns:
a Lane reference corresponding to the lane with the given number