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