Example #1
0
        public void Run()
        {
            Light l = new Light(new Off());
            l.PressSwich();

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