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