Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ code. I use virtual box. Please make sure your code work on you computer. Queue.h: Build your own word queue In this assignment, you're
C++ code. I use virtual box. Please make sure your code work on you computer.
Queue.h:
Build your own word queue In this assignment, you're going ask the user to enter individual words and complete sentences and store those words in a queue. You will also implement the functionality to dequeue individual words and print the contents ofthe queue. Structuring your program Your queue functionality should all be included in one class, called Queue. You are provided with a header file for a class-based implementation, called Queue.h on Moodle. You will need to create a file called Queue.cpp that implements the class defined in the h file. Your class does not need to look exactly like the one provided, you are welcome to modify it to structure your implementation differently. In the header provided, queue data is stored in a dynamically allocated array. The size of the array is a parameter in the Queue constructor. Your class needs to include public methods to enqueue and dequeue the data and print the queue Each of the menu options presented to the user needs to be handled in a separate function. You are welcome to write additional helper functions to support those functions. Included below are suggested, but not required, function prototypes First, do some system setup outside of the loop that controls the user's input to Quit the program, create an instance of the Queue class. Use a queue size of 10. Your Queue constructor should include the following settings: Queue Queue (int gs queue Size R gs array Queue new string que queue Head 0; queueTail 0; Setting the queueHead and queueTail to 0 initializes the index in the arrayQueue for the head and tail positions. Next, display a men When your program starts, you should display a menu that presents the user with options for how to run your program. The expected menu is shown hereStep 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