Question: Create a class myQueueADT that implements the queue functions using a circular array implementation. Make sure the implementation keeps track of all necessary variables like
Create a class myQueueADT that implements the queue functions using a circular array implementation. Make sure the implementation keeps track of all necessary variables like the front and rear indices and the size of the queue. The functions to implement are: qSize size Returns the size of the queue. emptyFlag isEmpty Returns true if the queue is empty and false if not. fullFlag isFull Returns true if the queue is full and false if not. firstInQ peek Returns the value of the first element in the queue. Returns if the queue is empty. enqueueelementValue Adds a new element elementValue to the end of the queue. firstInQ dequeue Removes the first element in the queue and returns its value. Returns if the queue is empty.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
