Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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