Practical 3 - Queue Implementation
Practical 3 - Queue Implementation
class Queue {
private int maxSize;
private long[] queArray;
private int front;
private int rear;
private int nItems;
1
} // end main ()
} // end class QueueApp
Exercise
1. Write a main method for the above program to hold 5 items in the queue
a. Insert 10,20,30,40 into the queue
b. Remove 10,20,30
c. Insert 4 items50,60,70 and 80
d. Display all items
2. Consider the following queue of characters where queue is a circular array of six memory sets
Front points to the 3rd position in the array
Rear points to the 5th position in the array
a. Insert A, B, C
b. Insert D
c. Remove A
d. Insert E, F &G
e. Remove B