Question
Please design and then code the following menu-driven program. ON C++ VISUAL BASIC The Name Game: 1. Input Full Name 2. Display Name 3. Change
Please design and then code the following menu-driven program. ON C++ VISUAL BASIC
The Name Game:
1. Input Full Name
2. Display Name
3. Change my Name to all Lower Case.
4. Count and display the number of words in name
5. Reverse the Name
6. Display Most Frequent Character
7. Exit Menu
Programming Rules:
Declare a character array in main. Use a separate function for each menu item. Pass the name around to each function. Use the C-string functions to manipulate the name.
Validate Input Full Name for not empty.
Keep offering the menu until they choose quit.
Appropriate use of functions required - no global variables - good programming style throughout.
Use Programs 10-12, 10-13 and 10-14 as examples.
Example:
1. Input Full Name: Billie Alice Williams
2. Display Name: Billie Alice Wiliams
3. Change to Lower: Your name has been converted to lower case.
2. Display Name: billie alice williams
4. Count: There are 3 words in your name.
5. Reverse Name: Your name has been reversed.
2. Display Name: smailliw ecila eillib
6. Most Letters: The most used letter in your name is l
7. Exit: Thank you for playing the game.
Program 10-12(continued) 30 1 void stringcopy (char stringl[, char string2[]) 32 int ndex = 0; // Loop counter 35 36 37 38 39 40 /l Step through stringl, copying each element to // string2. Stop when the null character is encountered while (string 1 [index ] != '\0') string2[index] stringl[index]; index++ 42 43 / Place a null character in string2. string2[index]10' 45 Program Output with Example Input Shown in Bold Enter a string with no more than 29 characters: Thank goodness it's Friday! [Enter] The string you entered is: Thank goodness it's FridayStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started