public void Compute(object receiver, string @operator, int operand)
 {
     // Create command operation and execute it
     Command command = new ElementaryArithCommand(
       receiver, @operator, operand);
     command.Execute();
     commands.Add(command);
 }
 public void Compute(Calculator receiver, string @operator, int operand)
 {
     // Create command operation and execute it
     Command command = new ElementaryArithCommand(
       receiver, @operator, operand);
     command.Execute();
     commands.Add(command);
     results.Push(receiver.GetResult());
 }
예제 #3
0
        public void Compute(object receiver, string @operator, int operand)
        {
            // Create command operation and execute it
            Command command = new ElementaryArithCommand(
                receiver, @operator, operand);

            command.Execute();
            commands.Add(command);
        }
예제 #4
0
        public void Compute(Calculator receiver, string @operator, int operand)
        {
            // Create command operation and execute it
            Command command = new ElementaryArithCommand(
                receiver, @operator, operand);

            command.Execute();
            commands.Add(command);
            results.Push(receiver.GetResult());
        }