Suppose you are building a remote control application. It performs three commands: turning on the TV, changing the channel to a specific number, and turning off the TV. Use the command pattern to implement this application.
Use the following guidelines.
- Don't change the provided code.
- The first command to execute is to turn on the TV. The
TurnOncommand must printTurning on the TV. - Next, change channels to the inputs given by the user. The user must give only three inputs. The
ChangeChannelcommand will printChannel was changed to X. X is the number given by the user. - The last command is to turn off the TV. The
TurnOffcommand must printTurning off the TV.