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

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 a grid of characters and then 5 options to change the grid as follows:

Menu:

1. Interchange column 2 with column 5

2. Count and display the number of vowels.

3. Display the array in a matrix (rows and columns)

4. Search for and display number of instances of any given character

5. Exit

Programming Requirements:

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

s l o a n

h o r s e

e g r i t

h o u s e

w a t e r

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.)

Programming Notes:

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

In menu option 2, display the total number of vowels.

In menu option 3, display the array as a matrix (ie, rows and columns). Leave spaces between each character. Use the iomanip library to help you create a nice display.

In menu option 4, prompt the user for one character. Search the array and count the number of times it occurs. Display the results.

In menu option 5, say goodbye and exit the program.

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().

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

Generative Artificial Intelligence For Project Management With Aws

Authors: Timothy Krimmel

1st Edition

B0CQV9KWB8, 979-8872627197

More Books

Students also viewed these Databases questions

Question

Define the goals of persuasive speaking

Answered: 1 week ago