public override void On(Switch sw) { Console.WriteLine("Turning light on!"); sw.state = new OnState(); }
public virtual void Off(Switch sw) { Console.WriteLine("The light is already off!"); }
public override void Off(Switch sw) { Console.WriteLine("Turning light off!"); sw.state = new OffState(); }
public virtual void On(Switch sw) { Console.WriteLine("Light is already on"); }