import java.util.*; public class MyQueueList implements MyQueue { private ListNode front; // read from here private ListNode back; // write to here public MyQueueList() { front = null; } public boolean isEmpty() { return front == null; } // join the back public void enqueue(Object item) { if (front == null) { front = back = new ListNode(item, null); } else { back = back.next = new ListNode(item, null); } } // leave the front public Object dequeue() { if (front == null) { throw new NoSuchElementException(); } else { Object item = front.data; front = front.next; return item; } } public Enumeration elements() { // put your code here } }