In the lecture, we saw an algorithm that converts an infixstring to its postfix equivalent. For this lab, you are going todevelop and implement a stack-based algorithm that canconvert an infix to its prefix equivalent using the Javaprogramming language.
- Please use the following three examples to test yourprogram
- Infix: A*((A-(B+C+D))*D-E*(F+C)), prefix:*A-*-A++BCDD*E+FC
- Infix: A-B+C*(A+B-C)*(C-D)$E*F, prefix: +-AB***C-+ABC$-CDEF
- Infix: (A+B)*(C-D)$E*F, prefix:**+AB$-CDEF
Please download and use the partially finished program onCanvas.
template:
class charStack {
private final int STACKSIZE=100;private int top;private char [] items;/** * initialize the stack. * top is set to -1 to represent being empty. **/public charStack() { items = new char[STACKSIZE]; top = -1;}/** * Checks to
PayPal Gateway not configured
PayPal Gateway not configured