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