001package headfirst.command.undo;
002
003public class LightOnCommand implements Command {
004        Light light;
005
006        public LightOnCommand(Light light) {
007                this.light = light;
008        }
009
010        public void execute() {
011                light.on();
012        }
013
014        public void undo() {
015                light.off();
016        }
017}