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() { previousSpeed = ceilingFan.GetSpeed(); ceilingFan.Low(); }
public void Execute() { fan.Low(); }
public void Excute() { _speed = _fan.Speed; _fan.Low(); }