Question
//DRIVER CLASS public class QueuesTester { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println(Testing Generic Linked List Queue); System.out.println(Enqueue'ing 10 numbers
//DRIVER CLASS
public class QueuesTester { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("Testing Generic Linked List Queue"); System.out.println("Enqueue'ing 10 numbers 0-9"); GenLLQueue qLLInts = new GenLLQueue(); for(int i=0;i qArrayInts = new GenArrayQueue(); for(int i=0;i<10;i++) { qArrayInts.enqueue(i); } System.out.println("Dequeu'ing all numbers and printing them out."); for(int i=0;i<10;i++) { System.out.println(qArrayInts.dequeue()); } System.out.println("Testing peek"); qArrayInts.enqueue(5); System.out.println(qArrayInts.peek()); System.out.println("Testing show queue"); for(int i=0;i<10;i+=2) { qArrayInts.enqueue(i); } qArrayInts.showQueue(); } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started