## 23.5.1 Priority Queue - Example

- Subclass `Simulation` and `Event` to emulate traffic at a hot dog stand
- Vary the number of seats, see the outcome
- There are two types of events:
  1. Arrival event - signals the arrival of a customer. If seated, (s)he stays a random amount of time, the leaves
  2. Leave event - frees the seat the customer was occupying
- Random arrival events are generated over an hour to initialize the simulation

prev |top |next