Question: C++ Switch Statements with functions. Please follow step 1 & 2. I will rate thumbs up if runs properly. Please Provide all files and comment
C++ Switch Statements with functions. Please follow step 1 & 2. I will rate thumbs up if runs properly. Please Provide all files and comment so i can follow and learn it.
Updated question: #2 Please use STL maps, templates, etc.

1. Create a function that "mimics" the effect of a switch statement, but can also handle any input. Meaning that the switch statement can only work with integers or characters. Yours will work with integers, characters, strings, etc 2. Make a class called mySwitch that will perform the functionality of a switch statement. The constructor of the class will allow for N parameters. The parameters will be the "condition" and then the address of which static function in the program to call. Hint: Would templates help you with this since any "condition" must be handled? What tools have we that can handle "infinite" input values?) 3. (Only for those that are "curious" and will count as Extra Credit for 25 points) Repeat 2 with varargs instead of vectors 1. Create a function that "mimics" the effect of a switch statement, but can also handle any input. Meaning that the switch statement can only work with integers or characters. Yours will work with integers, characters, strings, etc 2. Make a class called mySwitch that will perform the functionality of a switch statement. The constructor of the class will allow for N parameters. The parameters will be the "condition" and then the address of which static function in the program to call. Hint: Would templates help you with this since any "condition" must be handled? What tools have we that can handle "infinite" input values?) 3. (Only for those that are "curious" and will count as Extra Credit for 25 points) Repeat 2 with varargs instead of vectors
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
