static void Main(string[] args) { SimpleRemoteControl remote = new SimpleRemoteControl(); Light light = new Light(); LightOnCommand lightOn = new LightOnCommand(light); GarageDoor garageDoor = new GarageDoor(); GarageDoorOpenCommand garageOpen = new GarageDoorOpenCommand(garageDoor); remote.Command = lightOn; remote.ButtonWasPressed(); remote.Command = garageOpen; remote.ButtonWasPressed(); // Wait for user Console.ReadKey(); }