Question: Create a design document for the class implementation of a queue using an array of SIZE elements. Your routines should not declare an overflow (queue

Create a design document for the class implementation of a queue using an array of SIZE elements. Your routines should not declare an overflow (queue full) unless every slot in the array is used.

Clearly define your class with member functions and private data area. Class private data area only contain trackers front, rear and the array[SIZE].

Your design should be a document (not a complete C++ program) containing plain English and/or pseudo code on the logic suggested. A novice programmer should create the intended program from your design document.

Use a circular array implementation to create this design document for the following routines.

1. Enqueue() - Insert an element at the end of the queue called "rear". 2. Dequeue() - Delete and return the element at the start of the queue called "front" 3. DiplayQueue() - Print the values in the queue from front to rear. 4. Front() - return the value stored in the front of the queue 5. IsEmptyQ() - Return true if queue is empty, otherwise false. 6. IsFullQ() - Return true if queue is full, otherwise false. 7. CountQ() - Return Number of valid elements in queue.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!