Problem 3 (40 points) Implement the selection sort algorithm on a Queue of long-type items. Specifically, you are given the Queue class implementation and you need to write a method that takes a Queue and sorts it using the selection sort idea. The implementation of the Queue class for long data type is given in the lecture slides (the code skeleton including the implementation of the Queue class is provided below for your convenience). You should go over the Queue and use enqueue0. dequeue. peek0.. methods to sort the items in the Queue. You must work with the queue, that means you are not allowed to convert the Queue into an array (or some other data structure and then sort the array. Also, you should write the sorting part that means you cannot call a library sort method on the Queue. import java.util.NoSuchElementException; class Queue private int maxSize; private long [ queArray; private int front; private int reari private int nItems; public Queue (int s) /7 constructor maxSizes; queArray new long [maxSize]; front-0; rear-1; nItems0; public long dequeue // take item from front of queue if (isEmpty)) throw new NoSuchElementException ("Queue is empty") long temp queArray [front++); // if (front == maxSize) // deal with get value and increment front wraparound front- 0 nItems-1I one less item return temp public void enqueue (longj) I/ put item at rear of queue if (isFull )) throw new IllegalStateException ("Queue is full") if (rearmaxSize-1 / deal with wraparound rear-1 queArray[++rear]-j; I/ increment rear and insert nItems+ // one more item public long peek) 7/ peek at front of queue if (isEmpty)) throw new NoSuchElementException ("Queue is empty") return queArray[front]; public boolean isEmpty) // true if queue is empty return (nItems-0) public boolean isFull // true if queue is full return (ni terns= maxSize); public int size) I/ number of items in queue return nItems; public void display ) System.out.println("* for (int 1-0; i