abstract class Exp { abstract void print(); abstract int eval(); } class ConstExp extends Exp { private int value; ConstExp(int v) { value = v; } void print() { System.out.print(value); } int eval() { return value; } } class BinaryExp extends Exp { private Exp arg1; private Exp arg2; private char op; BinaryExp(char op, Exp arg1, Exp arg2) { this.op = op; this.arg1 = arg1; this.arg2 = arg2; } void print() { System.out.print(“(“); arg1.print(); System.out.print(” ” + op + ” “); arg2.print(); System.out.print(“)”); } int eval() { int a = arg1.eval(); int b = arg2.eval(); switch (op) { case ‘+’: return a + b; case ‘-‘: return a – b; case ‘*’: return a * b; case ‘/’: return a / b; } return 0; } } class Test { public static void main(String args[]) { Exp exp = new BinaryExp(‘+’, new BinaryExp(‘*’, new ConstExp(1), new ConstExp(2)), new BinaryExp(‘/’, new ConstExp(3), new BinaryExp(‘-‘, new ConstExp(4), new ConstExp(3)))); exp.print(); System.out.print(” = “); System.out.println(exp.eval()); } } from code above naswer this questions: Practice questions (0) Add a method to do differentiation. (f (x) + g (x)) ‘= f’ (x) + g ‘(x) (f (x) * g (x)) ‘= f (x) * g’ (x) + f ‘(x) * g (x) x ‘= 1 c ‘= 0 Exp diff (VarExp x) {….} Practice questions (1) Add, subtract, multiply and divide into one in a formula program Define the summarized class BinaryExp. (Hint) Define a field char op that contains an operator. Practice questions (2) Define a method that returns the number of constants contained in the formula. Practice questions (3) Extend the print method of the formula program Make it output considering the strength of the operator. For example, ((1 + (2 * 3)) + (4 + 5)) is Output like 1 + 2 * 3 + (4 + 5). (Hint) Use instanceof or give operators precedence Add field Practice questions (4) Define a class that represents a Java logical expression However, a logical expression consisting of only &&, ||,! Is sufficient. Also, as a method, print that outputs a logical expression and Define an “eval” method to calculate the value of the formula. The value of the logical expression is given by the parameter of the constructor. please explain thanks!