public void run(Stack inStack) throws ParseException { checkStack(inStack); // check the stack Object param2 = inStack.pop(); Object param1 = inStack.pop(); inStack.push(power(param1, param2)); }
public void run(Stack inStack) throws ParseException { checkStack(inStack); // check the stack Object param = inStack.pop(); inStack.push(cos(param)); // push the result on the inStack return; }