Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions

Question

2. Ask several students to explain the directions.

Answered: 1 week ago