Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Develop a flowchart and then write a menu-driven C++ program to solve the following problem. Upon execution of the program, the menu will be displayed,
Develop a flowchart and then write a menu-driven C++ program to solve the following problem. Upon execution of the program, the menu will be displayed, properly centered as shown below. You will be using user-defined functions and arrays and other constructs and references for this assignment. Help Size Array Arithmetic Quit Once the menu is displayed, the user is prompted for a menu selection. A wrong menu option is flagged as an error and the menu is displayed again. H or h (for Help) will call the function help which briefly explains the problem being solved and the purpose of each menu options. Once the user strikes a key followed by the return key, the menu will appear again. S or s (for SizeArray) will prompt the user for the actual size of the arrays. Allow the arrays to work up to a size of 15. For the purposes of this assignment, size the arrays to 6. You need to check for the size of the arrays before exiting this option. A or a (for Arithmetic) will call a function arithmetic which prompts the user for two operations (addArrays or SubArrays). This option must be executed after option S. For each case, call the appropriate functions that fill the arrays using random number generator of your choice. The program will then compute the requested operation and displays the arrays and the results side-by side. At no time the program should be terminated. Once the user viewed the results, striking a key will display the menu and the user is prompted again for a menu selection. You can remain in this mode if you like by adding additional logic to your design. Parameter passing to the function arithmetic is by reference. Q or q (for Quit) will clear the screen and terminate the program
Step 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