patterns/command/remoteundostatus/stereoonwithcdcommand.d

27 lines
426 B
D

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