Question: Implement a queue using a doubly linked list. Please name your class DoublyLinkedQ.java and a test program TestDoublyLinkedQ.java. Make sure you use the existing QInterface
Implement a queue using a doubly linked list. Please name your class DoublyLinkedQ.java and a test program TestDoublyLinkedQ.java. Make sure you use the existing QInterface interface.
Currently using Eclipse (Oxygen).
public class DoublyLinkedNode{ public T entry; public Node next; public Node prev; public DoublyLinkedNode(T entryPortion) { this(entryPortion, null, null); } public DoublyLinkedNode(T entryPortion, Node nextNode, Node prevNode) { entry = entryPortion; next = nextNode; prev = prevNode; } }
-----------------------------------------------------------------------------------------
public interface QInterface{ public void insert(T newEntry); public boolean isFull(); public boolean isEmpty(); public T remove(); public T peek(); public void clear(); public void printQ(); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
