100%(1)1 out of 1 people found this document helpful
This preview shows page 1 - 4 out of 7 pages.
For simplicity sake:a.operands will be single digit numbers
b.the following arithmetic operations will be allowed in an expression: +addition - subtraction *multiplication /division Exception ClassesProvide the following exception clases:1.InvalidNotationFormat – occurs when a Notation format is incorrect2.StackOverflowException – occurs when a top or pop method is called on an empty stack.3.StackUnderflowException – occurs when a push method is called on a full stack.4.QueueOverflowException – occurs when a dequeue method is called on an empty queue.5.QueueUnderflowException – occurs when a enqueue method is called on a full queue.GUI Driver1.Initially neither radio button for notation is selected. When a radio button is selected, the Convert button is enabled and the appropriate label and field are visible for the user input.2.When the user selects the Convert button, the appropriate label and field with the conversion will be displayed.3.When the user selects the Evaluate button, the “answer” to the expression will be displayed.4.When the Exit button is selected, the application will close.ALGORITHMSInfix expression to postfix expression:Read the infix expression from left to right and do the following: If the current character in the infix is a space, ignore it.If the current character in the infix is a digit, copy it to the postfix solution queueIf the current character in the infix is a left parenthesis, push it onto the stack If the current character in the infix is an operator, 1.Pop operators (if there are any) at the top of the stack while they have equal or higher precedence than the current operator, and insert the popped operators in postfix solution queue2.Push the current character in the infix onto the stack