Departure.java.html

  1  /**
  2     This event describes a customer departing from a teller.
  3  */
  4  public class Departure extends Event
  5  {
  6     private int teller;
  7  
  8     /**
  9        @param time the departure time
 10        @param teller the teller holding the customer
 11     */
 12     public Departure(double time, int teller)
 13     {
 14        super(time);
 15        this.teller = teller;
 16     }
 17     
 18     public void process(Simulation sim)
 19     {  
 20        BankSimulation bank = (BankSimulation) sim;
 21        bank.remove(teller);
 22     }
 23  }