module command.remoteundo.ceilingfanoffcommand; import command.remoteundo.command; import command.remoteundo.ceilingfan; class CeilingFanOffCommand : Command { CeilingFan ceilingFan; this(CeilingFan ceilingFan) { this.ceilingFan = ceilingFan; } void execute() { ceilingFan.off(); } void undo() { ceilingFan.high(); } }