There are many functions, commands, etc. in the code that do almost the same thing - with one change.
For example, instead of two functions : turnLightOn() and turnLightOff(), there should be one function : setLight(boolean on). This problem starts on the class function level and propagates to the Command level.
Generalizing your code will reduce clutter in your classes, packages, etc, and most important -> if you need to change some action - you will need to only change one place, reducing inconsistency bugs.
tl;dr/in two words -> USE PARAMETERS.
There are many functions, commands, etc. in the code that do almost the same thing - with one change.
For example, instead of two functions : turnLightOn() and turnLightOff(), there should be one function : setLight(boolean on). This problem starts on the class function level and propagates to the Command level.
Generalizing your code will reduce clutter in your classes, packages, etc, and most important -> if you need to change some action - you will need to only change one place, reducing inconsistency bugs.
tl;dr/in two words -> USE PARAMETERS.