Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

FOR C++: Please design, write the code and create the requisite submission files for the following problem: Functional Requirements: A menu-driven program that offers the

FOR C++:

Please design, write the code and create the requisite submission files for the following problem:

Functional Requirements:

A menu-driven program that offers the user 5 options as follows:

Menu:

1. Display array

2. Multiply each element in the array by 3.

3. Swap the values in row two with the values in row three.

4. Calculate the SUM of all elements and display that number.

5. Exit

Programming Requirements:

In main(), declare and initialize a 2-dimensional array that contains 5 x 5 elements. Initialize the elements to:

1,2,3,4,5

-20, -40,-60, -80, -100

3,3,3,3,3

5, 7, 9, 11, 13

-15, -25, -35, -45, -55

Display the menu and then execute the user's choice. Keep displaying the menu (and executing the user's choice) until the user chooses Option 5. (See pseudocode in this lesson for design help.)

Execute the chosen menu option by passing the array to a specific function which will do the work (in other words, there will be 4 array processing functions and one exit function).

No global variables, although global constants are fine. Remember, you must pass the array to the functions and not do the work in main().

Properly document your code with header blocks for each function and internal comments. I have attached a template program to this lesson so you can see what I am looking for.

Notes:

In menu option 2, please triple the actual values in the array. Don't print the array. That's a different menu option.

In menu option 3, please swap the actual array values. Don't display the array. That's a different menu option.

SHOW PROGRAM WORKS WITH A PICTURE PLEASE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions

Question

LO1 Identify why performance management is necessary.

Answered: 1 week ago