Question: When I run the code below on the command line, it takes in the first argument but then for the second argument, it outputs the

When I run the code below on the command line, it takes in the first argument but then for the second argument, it outputs the same postfix expression and result as the first argument that the user types. How do I fix this? Below is my code for Expression.java and ExpressionTest.java

When I run the code below on the command line, it takesin the first argument but then for the second argument, it outputsthe same postfix expression and result as the first argument that the

this is ExpressionTest.java

user types. How do I fix this? Below is my code for

This is how I tested my program. Notice how it outputs the same result for "10 / 2".

Expression.java and ExpressionTest.java this is ExpressionTest.java This is how I tested my

1 usage public static int evaluatePostfix(String[] postfixExpression) throws Exception \{ LinkedStack> stack = new LinkedStack >(); for (int i=0;i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!