Example #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
            MultiplyOperation multiply = new MultiplyOperation(10, 20);

            Console.WriteLine(multiply.Calculate());
        }
Example #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();
        }