Question
Queue class implementation with a circular array Create a design document for the class implementation of a queue using an array of SIZE elements. Your
Queue class implementation with a circular array
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.
Your design document is expected to be neat, readable and complete.
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