Question: Please code in C++ these 3 functions Function 1: The menu method prints a menu with the list of options. // The text to be
Please code in C++ these 3 functions Function 1: The menu method prints a menu with the list of options. // The text to be printed is: // Select one of the following options: // 1. Find my lucky number // 2. Find my lucky color // 3. Exit the program // [blank line] // Your selection: // [blank line] Function 2: The method declares a local variable named option, which must be // initialized to 0, where the selected option value is stored. // The method returns the value of the selected option. Function 3: The execute method receives the option value, the two arrays, // and their respective sizes as parameters. It implmenets a switch // selection control structure to call the methods to find either the // lucky number or lucky color. // The method returns true unless the value of the option is 3, in this // case it returns false. Make sure to include the default case which // prints the error message " \tERROR! Incorrect option value! " // NO VARIABLES ARE DECLARED IN THIS METHOD
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
