Question: c + + 1 4 . 2 0 Homework 7 P 3 : Authoring assistant ( 1 ) Prompt the user to enter a string
c
Homework P: Authoring assistant
Prompt the user to enter a string of their choosing. Store the text in a string. Output the string.
Ex:
Enter a sample text:
we'll continue our quest in space. there will be more shuttle flights and more shuttle crews and, yes, more volunteers, more civilians, more teachers in space. nothing ends here; our hopes and our journeys continue!
You entered: we'll continue our quest in space. there will be more shuttle flights and more shuttle crews and, yes, more volunteers, more civilians, more teachers in space. nothing ends here; our hopes and our journeys continue!
Implement the PrintMenu function to print the following command menu.
Ex:
MENU
c Number of nonwhitespace characters
w Number of words
f Fix capitalization
r Replace all s
q Quit
Implement the ExecuteMenu function that takes parameters: a character representing the user's choice and the user provided sample text. ExecuteMenu performs the menu options, according to the user's choice, by calling the appropriate functions described below.
In the main function, call PrintMenu and prompt for the user's choice of menu options for analyzingediting the string. Each option is represented by a single character.
If an invalid character is entered, continue to prompt for a valid choice. When a valid option is entered, execute the option by calling ExecuteMenu Then, print the menu, and prompt for a new option. Continue until the user enters q Hint: Implement Quit before implementing other options.
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
