// arrival.h: the Arrival class, representing arrival events. class Arrival : public Event { private: // doesCarBalk: decide whether a car should balk. // Deciding whether to balk is an activity that forms part of the arrival // event, so this method belongs among the event routines. int doesCarBalk (double litres, int queueLength); // interarrivalTime: the time until the next arrival, from an exponential // distribution. double interarrivalTime (); public: // Constructor. // The call "Event (time) is like Java's "super (time)". Arrival (double time) : Event (time) { } // makeItHappen: arrival event routine. void makeItHappen (); };