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