Exemple #1
0
        static void Main(string[] args)
        {
            RadioListener     radioListener     = new RadioListener();
            TelephoneListener telephoneListener = new TelephoneListener();

            RadioStation station = new RadioStation();

            station.ConnectListener(radioListener);
            station.ConnectListener(telephoneListener);

            Console.WriteLine("Setting new record...");
            station.SetNewRecord("Queen - Another One Bites The Dust");
        }
Exemple #2
0
 public void Listen(RadioStation radioStation)
 {
     Console.WriteLine($"TelephoneListener: Listening \"{radioStation.PlayingRecord}\"");
 }