911 Switchboard Applet

12 points

This program simulates handling 911 calls that are coming into a 911 operator. An ambulance is dispatched to each 911 call. The ambulances that are waiting at the station are stored in a queue. When an ambulance returns to the station, it waits until all the other ambulances are dispatched before it is dispatched again. The ambulances that are out on calls are stored both in an ArrayList and a DefaultComboBoxModel. An integer keeps track of how many 911 calls are waiting for an ambulance to be dispatched.


You can see how a program works by viewing an applet online. The link is http://uzza.us/cs/ap/queueApplet/QueueAmbulanceApplet.htm.
(This applet appears to work in Google Chrome.)

If the above applet isn't working, here is a screenshot of the program in operation:

Starting Point

You can download AmbulanceFrame.java; this is the main file. Instructions for writing the program are in the file. You should also include in your applet project the Queue interface file and your CircularArrayQueue.java file.