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();
     }
 }
Ejemplo n.º 2
0
 public void execute()
 {
     previousSpeed = ceilingFan.GetSpeed();
     ceilingFan.Meduim();
 }