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"); }
public void Listen(RadioStation radioStation) { Console.WriteLine($"TelephoneListener: Listening \"{radioStation.PlayingRecord}\""); }