Design Patterns, Behavioural Design, Java, Software Development.
Concrete command to turn on the light public class TurnOnLightCommand implements Command { private Light light; public TurnOnLightCommand(Light light) { this.light = light; } @Override public void execute() { light.turnOn(); } } // Concrete command to turn off the light public class