patterns/command/remoteundo/stereooffcommand.d

27 lines
398 B
D

module command.remoteundo.stereooffcommand;
import command.remoteundo.command;
import command.remoteundo.stereo;
class StereoOffCommand : Command
{
Stereo stereo;
this(Stereo stereo)
{
this.stereo = stereo;
}
void execute()
{
stereo.off();
}
void undo()
{
stereo.on();
stereo.setCD();
stereo.setVolume(11);
}
}