Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

publicstatic void main (String args[]) { //edit this line to perform desired tes

ID: 3612996 • Letter: P

Question

    publicstatic void main (String args[]) {
  //edit this line to perform desired test:
        int n = 7; IntQueue q = new WrapIntQueue(n);
       
        q.enQ(1); q.enQ(2);q.enQ(3);
       System.out.println(q.deQ());
       System.out.println(q.deQ());
       System.out.println(q.deQ());
       q.enQ(10);q.enQ(11);q.enQ(12);q.enQ(13);q.enQ(14);q.deQ();q.enQ(15);q.enQ(16);
       System.out.println("sz="+q.size()+" isfull="+q.isFull());
        while(q.size()>0)System.out.print(" deq "+q.deQ());
       System.out.println("");

Explanation / Answer


       System.out.println("sz="+q.size()+" isfull="+q.isFull());
        while(q.size()>0)System.out.print(" deq "+q.deQ());
       System.out.println("");
}

}