001package headfirst.command.party;
002
003public class StereoOnWithCDCommand implements Command {
004        Stereo stereo;
005
006        public StereoOnWithCDCommand(Stereo stereo) {
007                this.stereo = stereo;
008        }
009
010        public void execute() {
011                stereo.on();
012                stereo.setCD();
013                stereo.setVolume(11);
014        }
015
016        public void undo() {
017                stereo.off();
018        }
019}