Question: could i get help building these methods in java Constructor Detail Notation public Notation () Method Detail evaluatePostfixExpression public static double evaluatePostfixExpression (java.lang.String postfixExpr) throws

could i get help building these methods in java

Constructor Detail

Notation

public Notation()
Method Detail

evaluatePostfixExpression

public static double evaluatePostfixExpression(java.lang.String postfixExpr) throws InvalidNotationFormatException

Evaluates a postfix expression from a string to a double

Parameters:

postfixExpr - the postfix expression in String format

Returns:

the evaluation of the postfix expression as a double

Throws:

InvalidNotationFormatException - if the postfix expression format is invalid

convertPostfixToInfix

public static java.lang.String convertPostfixToInfix(java.lang.String postfix) throws InvalidNotationFormatException

Convert the Postfix expression to the Infix expression

Parameters:

postfix - the postfix expression in string format

Returns:

the infix expression in string format

Throws:

InvalidNotationFormatException - if the postfix expression format is invalid

convertInfixToPostfix

public static java.lang.String convertInfixToPostfix(java.lang.String infix) throws InvalidNotationFormatException

Convert an infix expression into a postfix expression

Parameters:

infix - the infix expression in string format

Returns:

the postfix expression in string format

Throws:

InvalidNotationFormatException - if the infix expression format is invalid

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!