public void Undo() { switch (prevSpeed) { case CeilingFan.Speed.HIGH: fan.High(); break; case CeilingFan.Speed.MEDIUM: fan.Medium(); break; case CeilingFan.Speed.LOW: fan.Low(); break; case CeilingFan.Speed.OFF: fan.Off(); break; } }
public void Execute() { fan.High(); }