static void Main(string[] args) { var remoteControl = new RemoteControl(new SonyTV()); remoteControl.TurnOn(); remoteControl.TurnOff(); var advancedRemoteControl = new AdvancedRemoteControl(new SamsungTV()); advancedRemoteControl.TurnOn(); advancedRemoteControl.TurnOff(); advancedRemoteControl.SetChannel(1); Console.ReadKey(); }
static void Main(string[] args) { var remoteControl1 = new RemoteControl(new SamsungTv()); remoteControl1.TurnOn(); remoteControl1.TurnOff(); var remoteControl2 = new AdvancedRemoteControl(new SonyTv()); remoteControl2.TurnOn(); remoteControl2.SetChannel(2); remoteControl2.TurnOff(); Console.ReadLine(); }