public void Compute(char @operator, int operand) { Command command = new CalculatorCommand(this.calculator, @operator, operand); command.Execute(); this.commands.Add(command); this.currentCommandIndex++; }