Question: Create a user-Defined Abstract Data Type named Queue - Use an appropriate set of C++ header/implementation files - Queue is implemented as a dynamically allocated

Create a user-Defined Abstract Data Type named Queue

- Use an appropriate set of C++ header/implementation files

- Queue is implemented as a dynamically allocated array

-implemented as a circular queue

- queue consists of 0 or more QElement values

- QElement is an exportable standard library double data type

Exportable operations: (declared in .h file & defined in .cpp file) - (+) implement a minimum number of constructor functions - (*) before an element can be accessed and process it must first be removed from the front of queue.

Queue - default constructor function - creates an initialized empty queue (+), default size of 3

Queue - overloaded/parameterized constructor - creates an initialized empty queue(+), user specified size

Queue - Copy constructor - creates a duplicate copy of an existing queue (*)

~Queue - Destructor function - destroys the existing queue, queue instance state before going out of scope - initialized empty queue

enQueue - inserts a new element to the back of the queue
deQueue - removes an existing element from the front of the queue
view - displays the contents of the queue from the front to the back (*)

isEmpty - returns true if the current queue instance is empty - false otherwise

isFull - returns true if the current queue instance is full - false otherwise

User-Defined Data Types

QElement

Qpointer

Queue output(view)

Beginning -> End

Beginning -> 4.34 -> -4.5 -> End

Required header file (.h). // only partially specified // General description of 

Required header file (.h). // only partially specified // General description of the ADT and supported operations - exportable operations only // Do not include any implementation details #ifndef_QUEUE_H #define _QUEUE H typedef double QElement; class Queue { public: // exportable // General description of each of the ADT operations/functions - exportable operations only Queue (...); Queue(Queue & ); -Queue(): }; void enQueue( const Element); void deQueue( QElement & ); void view(); #endif // Guard typedef QElement * QPointer; QPointer queue; short front, back; bool isEmpty() const; bool isFull) const; // replace ... with required arguments private: // No private member documentation - implementation details are hidden/abstracted away const short Q_SIZE; // must be initializaed // reuse enQueue & de Queue // reuse deQueue // reuse enQueue & de Queue // non-exportable // Guard

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Queueh ifndef QUEUEH define QUEUEH typedef double QElement class Queue public Queue default construc... View full answer

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 Operating System Questions!