Esempio n. 1
0
    private void Calculate()
    {
        char operatorChar = operatorsStack.Pop();

        double number1 = numbersStack.Pop();
        double number2 = numbersStack.Pop();
        double result  = OperatorFactory.GetResult(operatorChar, number1, number2);

        numbersStack.Push(result);
    }