@@ -0,0 +1,1122 @@
+package com.phoenix.eteacher.util;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.regex.Matcher;%0Aimport java.util.regex.Pattern;%0A%0Apublic class CompareExpression %7B%0A%09public static boolean isTheSame(String exp1, String exp2)%7B%0A%09%09ExpressionTree et1 = new ExpressionTree(exp1);%0A%09%09ExpressionTree et2 = new ExpressionTree(exp2);%0A%09%09return (et1.isTheSame(et2));%0A%09%7D%0A%09public static void main(String%5B%5D args)%7B%0A%09%09String rightAnswera = %221+3+3%22;%0A%09%09String answera = %221+(2+3*3+3*4)*2%22;%0A%09%09String ans = %22(1 + 2)*( 3 + 4)/5%22;%0A%09%09String ans1 = %22(1 + 2)/5*( 3 + 4)%22;%0A//%09%09ExpressionTree et = new ExpressionTree(ans);%0A%09%09ExpressionTree et1 = new ExpressionTree(ans1);%0A//%09%09et.printTree();%0A%09%09%0A%09%09System.out.println(%22Now%22);%0A%09%09System.out.println(%22Now%22);%0A//%09%09ArrayList%3CString%3E opt = et.sortAndOutput();%0A//%09%09ArrayList%3CString%3E opt1 = et1.sortAndOutput();%0A//%09%09et.printTree();%0A%09%09for (int i = 0; i %3C et1.finalExpression.size(); ++i)%0A%09%09%09System.out.println(et1.finalExpression.get(i));%0A%09%09System.out.println(%22Now%22);%0A%09%09et1.printExp();%0A%09%09//for (int i = 0; i %3C opt.size(); ++i)%0A%09%09//%09System.out.println(opt.get(i));%0A%09%09System.out.println(isTheSame(ans, ans1));%0A%09%09%0A%09%7D%0A%0A%7D%0A

Add expression support