Question: Java Postfix to Infix calculator - create class Stack{} - need to show infix representation and Result Skeletal code: import java.io.*; public class Converter {
Java Postfix to Infix calculator
- create class Stack{}
- need to show infix representation and Result
Skeletal code:
import java.io.*;
public class Converter {
public static void main(String[] args) { Converter and = new Converter(); ans.convert(); }
public void convert() {}
public void calculateResult(String infix) {}
public String[] readPostfix() { BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); String postfixin; try { System.out.print("Input Postfix: "); postfixin = input.readLine(); return postfixin.split(" "); } catch (IOException e) { System.err.println("Input ERROR."); }
// return empty array if error occurs return new String[] {}; }
}
class Stack {}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
