1. Engineering
  2. Computer Science
  3. develop a flowchart and then write a menudriven c program...

Question: develop a flowchart and then write a menudriven c program...

Question details

Read the notes and hints very carefully! (a) 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 Hints: 1. Your program will only have one main() function and many other user-defined functions as stated above. In addition to the main() function which must have a return statement, other functions may have return statements as well. There will be one .cpp file with multiple functions. 2. It is essential that function declarations (prototypes), definitions, and invocations fo the instructions given in class 3. Make sure your program executes correctly 4. Make sure the variables are correctly declared without any conflicts with other variables. You may have to change some of the variables to make each variable unique 5. Your program will terminate when the user selects Q or q 6. Use arrays, functions, and references for this assignment

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution