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
Develop a program that presents the user with the following menu list of options:
Example of menu displayed on the computer screen
X
MENU
Count the number of vowels in a string
Count the number of words in a string.
Convert to uppercase all lowercase letters in a string.
Order ascending the characters in a string.
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 End the program ends.
Validate the option entered by the user using a loop to accept only numbers between and
Otherwise, an error message is displayed and the option of interest is resolicited.
Explanation of Code Requirements for PROBLEM
For options to 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 to 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 specificationsdescription:
a Option 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 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
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
