(1) Write LinkedQueue.java.
QueueInterface.java
public interface QueueInterface<T> {
void enqueue(T element) throws QueueOverflowException1;
// Throws QueueOverflowException if this queue is full;
// otherwise, adds element to the rear of this queue.
T dequeue() throws QueueUnderflowException;
// Throws QueueUnderflowException if this queue is empty;
// otherwise, removes front element from this queue and returnsit.
boolean isFull();
// Returns true if this queue is full;
// otherwise, returns false.
boolean isEmpty();
// Returns true if this queue is empty;
// otherwise, returns false.
int size();
// Returns the number of elements in this queue.
}
LinkedQueue.java
——————
import support.LLNode;
public class LinkedQueue<T> implementsQueueInterface<T> {
protected LLNode<T> front; //reference to the front of this queue
protected LLNode<T> rear; //reference to the rear of
PayPal Gateway not configured
PayPal Gateway not configured