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.
Here is a screenshot of the program in operation:
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 project the Queue interface file and your CircularArrayQueue.java file.