static void Main(string[] args) { DogDoor door = new DogDoor(); Thread test = new Thread(DogStop); door.AddAllowedBrak(new Bark("rowlf")); door.AddAllowedBrak(new Bark("roowlf")); door.AddAllowedBrak(new Bark("rawlf")); door.AddAllowedBrak(new Bark("woof")); BarkRecognzition recogniztion = new BarkRecognzition(door); Remote remote = new Remote(door); Console.WriteLine("Dog started barking...!!"); recogniztion.Recognize(new Bark("rowlf")); Console.WriteLine("Dog goes outside!!!"); test.Start(); Console.WriteLine("Dog comes inside"); }
public Remote(DogDoor door) { this._door = door; }
public BarkRecognzition(DogDoor door) { _door = door; }