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