throw new UnsupportedOperationException("missing operation");
if (values.isEmpty())
throw new UnsupportedOperationException("missing value");
Operation operation = operations.pop();
result = operation.calculate(values.pop(), result);
}
}
if (!operations.isEmpty())
throw new UnsupportedOperationException("wrong number of arguments");
return result;