Question
provides a simple framework for a queue data structure. Implement the details for the operations for this basic queue data structure that will use an
provides a simple framework for a queue data structure. Implement the details for the operations for this basic queue data structure that will use an array of elements of type string. We will not use templates for this implementation. Provide the implementations details for the following class methods (i.e. operations): initialize(), empty(), enqueue(string element), dequeue(), and nextElement(). Descriptions of most these methods are provided in the source code and in supplementary module in the Learning Activities area. The code in the Driver.cpp file will remain the same.
Hint: Again, you only need to modify the areas in the Queue.h file by adding the necessary code to implement the TODO areas as noted in the comments. The prototype for the functions and everything else in the program must remain unchanged. You must use the function signature for your implementation.
Output: The output for the program after the functions are implemented should appear as follows:
Queue properties: empty = 1 max size = 20 current size = 0 top element = [None]
Queue properties: empty = 0 max size = 20 current size = 10 top element = all
Queue elements: all of our dreams can come true if we just
Queue properties: empty = 1 max size = 20 current size = 0 top element = [None] |
Queue elements: The queue is empty!
Queue properties: empty = 0 max size = 20 current size = 6 top element = have
Queue elements: have the courage to pursue them
** Press any key to continue ** /** |
Step by Step Solution
3.55 Rating (155 Votes )
There are 3 Steps involved in it
Step: 1
Answer ifndef QUEUEH define QUEUEH include iostream include string class Queue private stdstring ele...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