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