public class PrintQueue<E>
Objective: To understand the nature of java.util.Queue and write a small program that implements the 4 methods of java.util.Queue that you must know for the AP exam.
Assignment: After downloading and compiling the source code, make the PrintQueue class function by
- 1) initilizing the LinkedList documentsPrintOut
- 2) use the comments above method below to add functiontionality to the four methods below
- boolean add(Object e)
- Object remove()
- Object peek()
- boolean isEmpty()
- Write a small program that demonstrates the use of each of these methods.
Design a program that uses a Queue for patients who visit a Hospital Emergency room. You can design this program any way that you want including creating other classes as long as you use a queue!