Create a user-Defined Abstract Data Type named Queue - Use an appropriate set of C++ header/implementation files
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 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