Question: 1. You are to create a menu-based system INSIDE A FUNCTION named menu( ), using a switch statement to direct the flow of your program
1. You are to create a menu-based system INSIDE A FUNCTION named menu( ), using a switch statement to direct the flow of your program for the option selected by the user. Your main program should only contain the directives to call the menu () function.
2. Your menu will consist of 5 options, the first three options will be programs that you have already written in the course (identified in requirement 3 below), but MUST be put into functions (either value returning or void) and called from within the switch statement. The fourth option will be the Hit the Slopes project #5 on page 642, again, all created within a function and called from the menu() function. Option 5 will be the exit option. You may use either an integer or a char variable for the menu options (although I recommend a char for simplicities sake). When running the options below, be sure to use appropriate input validation on input values from the user.
3. The five options in your program should include (you can modify the names of the options as you deem necessary):
1. Problem #19 (Math Tutor) from page 152
2. Problem #16 (Overloaded Hospital) on page 404
3. Problem #19 (Tic-Tac-Toe game) on page 600
4. Problem #5 (Hit the Slopes) on page 642. You have not done this program yet, so there is a little extra work for this part of the final project.
5. Exit (with confirmation Are you sure you want to quit (Y/N)?)
4. Once the user chooses option 1, 2, 3, or 4, the menu should disappear and display the program the user wishes to execute and run that program (just like when you first created the programs a while back (only, if your program didnt run back then, you must now correct the program, I WILL run each option). Once the chosen project runs, the user should be given the choice to run the project again, if the user chooses N to run that option again, then the screen should clear and take the user back to the main menu. The only way the program should shut down is for the user to choose the exit option (option 5). Your program should verify that the user REALLY wants to exit, and then shut down if they answer Y or y to the confirmation question. If the user answers with N or n, then the menu should clear the screen and redisplay the menu, awaiting the user to run the option of their choice. I recommend using the toupper() or tolower() function to limit the values to test on the exit confirmation option.
The text book is starting out with C++ early objects ninth edition by tony gaddis, judy walters, and godfrey muganda.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
