Example #1
0
        public static void Run()
        {
            CeilingFanPullChain ceilingFanPullChain = new CeilingFanPullChain();

            for (int i = 0; i < 10; i++)
            {
                ceilingFanPullChain.Pull();
            }
        }
Example #2
0
 public override void Pull(CeilingFanPullChain ceilingFanPullChain)
 {
     ceilingFanPullChain.CurrentState = new High();
     Console.WriteLine("High speed");
 }
Example #3
0
 public override void Pull(CeilingFanPullChain ceilingFanPullChain)
 {
     ceilingFanPullChain.CurrentState = new Off();
     Console.WriteLine("Off");
 }
Example #4
0
 public abstract void Pull(CeilingFanPullChain ceilingFanPullChain);