The implementation details of the fastqueue and inclass classes in java. The in-class activity instructions for students to complete the dequeue method in the fastqueue class with the precondition that the queue is not empty, and complete the lessthan method in the inclass class to return the number of elements less than the given argument. The document also includes junit test cases for the countnumberlessthan method.
public class FastQueue implements GenericQueue { private class Node { private E data; private Node next; public Node(E element) { data = element; next = null; } } private Node front; private Node back; public FastQueue() { front = back = null; } // Complete dequeue // Precondition: The queue is not empty public E dequeue()