// TODO: Remove each 'todo' comment once I implement each part! // TODO: class comment header import java.util.*; public class ArrayDeque implements Deque { // TODO: declare my private fields here // TODO: comment header public ArrayDeque() { // TODO: implement the constructor } // TODO: comment header public void addFirst(E element) { // TODO: implement this method } // TODO: comment header public void addLast(E element) { // TODO: implement this method } // TODO: comment header public void clear() { // TODO: implement this method } // TODO: comment header public boolean isEmpty() { // TODO: implement this method return true; } // TODO: comment header public Iterator iterator() { return new ArrayDequeIterator(); } // TODO: comment header public E peekFirst() { // TODO: implement this method return null; } // TODO: comment header public E peekLast() { // TODO: implement this method return null; } // TODO: comment header public E removeFirst() { // TODO: implement this method return null; } // TODO: comment header public E removeLast() { // TODO: implement this method return null; } // TODO: comment header public int size() { // TODO: implement this method return 0; } // TODO: comment header public String toString() { // TODO: implement this method } // TODO: Implement your inner iterator class here. // TODO: comment header private class ArrayDequeIterator implements Iterator { // TODO: declare my private fields here // TODO: comment header public ArrayDequeIterator() { // TODO: implement this constructor } // TODO: comment header public boolean hasNext() { // TODO: implement this method return false; } // TODO: comment header public E next() { // TODO: implement this method return null; } /** * Removes the most recently returned element. * Not supported. Throws an UnsupportedOperationException when called. */ public void remove() { throw new UnsupportedOperationException(); } } }