public void undo() { if (previousSpeed == Fan.HIGH) { ceilingFan.High(); } else if (previousSpeed == Fan.MEDUIM) { ceilingFan.Meduim(); } else if (previousSpeed == Fan.LOW) { ceilingFan.Low(); } else if (previousSpeed == Fan.OFF) { ceilingFan.Off(); } }
public void Undo() { switch (_speed) { case Fan.HIGH: _fan.High(); break; case Fan.MEDIUM: _fan.Medium(); break; case Fan.LOW: _fan.Low(); break; case Fan.OFF: _fan.Off(); break; } }
public void Execute() { _fan.Off(); }
public void Excute() { _speed = _fan.Speed; _fan.Off(); }
public void Undo() { _fan.Off(); }
public void execute() { previousSpeed = ceilingFan.GetSpeed(); ceilingFan.Off(); }