Ejemplo n.º 1
0
        private static void MultiplyOperation()
        {
            Calculator calculator = new Calculator(new MultiplyOperation());
            int result = calculator.Calculate(NumberOne, NumberTwo);

            Console.WriteLine("Multiply operation result: {0}", result);
        }
Ejemplo n.º 2
0
        private static void DivideOperation()
        {
            Calculator calculator = new Calculator(new DivideOperation());
            int result = calculator.Calculate(NumberOne, NumberTwo);

            Console.WriteLine("Divide operation result: {0}", result);
        }