Пример #1
0
        static void Main(string[] args)
        {
            DogDoor door   = new DogDoor();
            Remote  remote = new Remote(door);

            Console.WriteLine("Fido barks to go outside...");
            remote.PressButton();
            Console.WriteLine("\nFido has gone outside..");
            remote.PressButton();
            Console.WriteLine("\nFido's all done...");
            remote.PressButton();
            Console.WriteLine("\nFido's back inside..");
            remote.PressButton();
        }
Пример #2
0
 public Remote(DogDoor door)
 {
     this.door = door;
 }