listing continued public static void main(string[argsthrows ioexception string inputoutputwhile(truesystem out print("enter infix")system out flush()input getstring()/read string from kbd ifinput equals(""/quit if [enterbreak/make translator intopost thetrans new intopost(input)output thetrans dotrans()/do the translation system out println("postfix is output '\ ')/end while /end main(//public static string getstring(throws ioexception inputstreamreader isr new inputstreamreader(system in)bufferedreader br new bufferedreader(isr)string br readline()return ///end class infixapp ///////////////////////////////////////////////////////////////the main(routine in the infixapp class asks the user to enter an infix expression the input is read with the readstring(utility method the program creates an intopost objectinitialized with the input string then it calls the dotrans(method for this object to perform the translation this method returns the postfix output stringwhich is displayed the dotrans(method uses switch statement to handle the various translation rules shown in table it calls the gotoper(method when it reads an operator and the gotparen(method when it reads closing parenthesisthese methods implement the second two rules in the tablewhich are more complex than other rules we've included displaystack(method to display the entire contents of the stack in the stackx class in theorythis isn' playing by the rulesyou're supposed to access the item only at the top howeveras diagnostic aidthis routine is useful if