Example #1
0
        public void Run()
        {
            Calculater calculater = new Calculater();

            calculater.strategy = new SwingAddStrategy();
            List <int> intList = new List <int>()
            {
                2, 3, 4, 5, 7, 8, 9
            };

            Console.WriteLine(calculater.DoMath(intList));
            calculater.strategy = new AddStrategy();
            Console.WriteLine(calculater.DoMath(intList));
        }