Question: PROBLEM 1 Develop a program that presents the user with the following menu ( list ) of options: Example of menu displayed on the computer

PROBLEM 1
Develop a program that presents the user with the following menu (list) of options:
Example of menu displayed on the computer screen
|X
MENU
1. Count the number of vowels in a string
2. Count the number of words in a string.
3. Convert to uppercase all lowercase letters in a string.
4. Order ascending the characters in a string.
5. End
Enter the number of the desired option:
When the user enters the number of the option of interest, the program executes the process
indicated. Then, instead of finishing, the program presents again the menu of options so that
the user can select another one. When the user enters a 5(End), the program ends.
Validate the option entered by the user using a loop to accept only numbers between 1 and 5.
Otherwise, an error message is displayed and the option of interest is re-solicited.
Explanation of Code Requirements for PROBLEM 1
1) For options 1 to 4, the program requests a string from the user and stores it in an array of
chars (do not duplicate this piece of code for each option 1 to 4, instead create a function to
perform this task). After getting the string, the program calls a function that performs the
option selected over this string. The program must be developed using functions in
compliance with the following design specifications/description:
a. Option 1 Develop a function that receives the array of chars (string) as parameter and
returns the number of vowels (uppercase or lowercase) in the string.
b. Option 2 Develop a function that receives the array of chars (string) as parameter and
returns the number of words in the string. A word is separated from another by a
whitespace character. To facilitate this calculation, use as a premise that only one
whitespace is between one word and the other. This function then counts the number of
whitespaces in the string (nw) and, based on this value, determines the number of words
it contains (nw+1).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!