Exemplo n.º 1
0
        static void Main(string[] args)
        {
            BigMassiveRocket rocket = new BigMassiveRocket();
            BigRedButton     button = new BigRedButton();

            button.RegisterHandler(rocket.Launch);

            string userInput = string.Empty;

            while (userInput != "q")
            {
                if (userInput == "push")
                {
                    button.Push();
                }

                userInput = Console.ReadLine();
            }
        }