Class Customer

java.lang.Object
  extended by Customer

public class Customer
extends java.lang.Object


Constructor Summary
Customer(int numItems)
          Creates a Customer object with the specified initial number of items.
 
Method Summary
 int getArrivalTime()
          Gets the arrival time.
 int getDepartureTime()
           
 int getInitialItemCount()
           
 int getItemCount()
           
 void removeItem()
          Removes one item from the customer's basket.
 void setArrivalTime(int arrivalTime)
          Sets the arrival time; your code will call this on Customer instances returned by the CustomerGenerator.
 void setDepartureTime(int departureTime)
          Sets the departure time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Customer

public Customer(int numItems)
Creates a Customer object with the specified initial number of items.

Parameters:
numItems -
Method Detail

getArrivalTime

public int getArrivalTime()
Gets the arrival time.

Returns:
Returns the time that this Customer arrived.

setArrivalTime

public void setArrivalTime(int arrivalTime)
Sets the arrival time; your code will call this on Customer instances returned by the CustomerGenerator.

Parameters:
arrivalTime - The arrivalTime to set.

getItemCount

public int getItemCount()
Returns:
Returns the current number of items in this customer's basket.

getInitialItemCount

public int getInitialItemCount()
Returns:
Returns the number of items this customer had at arrival.

getDepartureTime

public int getDepartureTime()
Returns:
Returns the departureTime.

setDepartureTime

public void setDepartureTime(int departureTime)
Sets the departure time. Your code will call this method when a customer leaves the store.

Parameters:
departureTime - The departureTime to set.

removeItem

public void removeItem()
Removes one item from the customer's basket.