1 |
Constructor |
Creates 3 priority queues.
|
2 |
getCar() |
Raises an exception since all three queues will be empty.
|
3 |
receiveCar(a, low) |
Places car a into the low queue.
|
4 |
receiveCar(b, low) |
Places car b into the low queue.
|
5 |
receiveCar(f, high) |
Places car f into the high queue.
|
6 |
receiveCar(d, medium) |
Places car d into the medium queue.
|
7 |
receiveCar(g, high) |
Raises an exception since the high queue is already full.
|
8 |
receiveCar(e, medium) |
Places car e into the medium queue.
|
9 |
getCar() |
Returns car f from the high queue.
|
10 |
getCar() |
Returns car d from the medium queue.
|
11 |
getCar() |
Returns car e from the medium queue.
|
12 |
getCar() |
Returns car a from the low queue.
|
13 |
getCar() |
Returns car b from the low queue.
|
14 |
getCar() |
Raises an exception since there are no more cars available in any of the three queues.
|
15 |
isEmpty() |
Returns true since all three queues are empty.
|