public void Run() { Light l = new Light(new Off()); l.PressSwich(); l.PressSwich(); }
public override void PressSwich(Light light) { Console.WriteLine("turn off the light."); light.State = new Off(); }
public abstract void PressSwich(Light light);