public void Compute(char @operator, int operand)
        {
            // Create command operation and execute it
            Command command = new CalculatorCommand(calculator, @operator, operand);

            command.Execute();

            // Add command to undo list
            commands.Add(command);
            current++;
        }
Beispiel #2
0
        public void Compute(char @operator, int operand)
        {
            // Create command operation and execute it
            Command command = new CalculatorCommand(
                _calculator, @operator, operand);
            command.Execute();

            // Add command to undo list
            _commands.Add(command);
            _current++;
        }
Beispiel #3
0
        public void Compute(string @operator, int operand)
        {
            Command command = new CalculatorCommand(
                _calculator, @operator, operand);
            command.Execute();

            _commands.Add(command);
            _current++;
        }