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());
        }