ArrayQ // finish the methods LinkedQ// finish methods Qinterface class that implements the ADT queue by using a resizable circular array. ic final class ArrayQueue T implements QueueInterface T { private T [ ] queue; // Circular array of queue entries private int frontindex; // Index of front entry // No need to keep track of the backIndex because... // The back index can be calculated from (frontindex + size) 5 queue.length // Plus, there is only one place in the code where we really need the back inde private int size; private static final int DEFAULT_CAPACITY = 10; port java.util.NosuchElementException; A class that implements the ADT queue by using a chain of linked nodes that has references to the front and end of the chain. Adds will be after the last node. Removes will be from the front node. blic final class LinkedQueue T implements QueueInterface T { private Node firstNode; // References node at front of queue private Node lastNode; // References node at back of queue public LinkedQueue() \{ firstNode = null lastiode = null; 3 // end default constructor public void add( T newentry) \{ // TODO 3 // end enqueue public T peek() \{ if (isempty()) throw new NosuchelementException(); else return firstNode.data; 3 // end getFront public T remove() \{ // TODO T frontbata = peek (); // Might throw NoSuchElementException return frontData; 3 // end dequeue public boolean isempty() \{ // TODO return false; 3 // end isEmpty public void clear() \{ // TODO 3 // end clear private class Node \{ private T data; private Node next; private Node(T data) \{ this. data = data; this. next = null; \} \}.