예제 #1
0
        static void Main(string[] args)
        {
            // Perform an "Add" operation
            AddOperation add = new AddOperation(10, 20);

            Console.WriteLine(add.Calculate());

            // TODO: perform a "Multiply" operation
        }
예제 #2
0
        static void Main(string[] args)
        {
            // Perform an "Add" operation
            AddOperation add = new AddOperation(5, 16);

            Console.WriteLine(add.Calculate());

            // TODO: perform a "Multiply" operation (create MultiplyOperation class)
            MultiplyOperation multiply = new MultiplyOperation(5, 16);

            Console.WriteLine(multiply.Calculate());

            Console.ReadLine();
        }