//File: Difference.java //Name: Trai Pham //Date: 02/16/2020 //Course: CSE 8B /** */ public class Difference extends ArithmeticExpression{ public Difference(ArithmeticExpression var1, ArithmeticExpression var2){ this.a = var1; this.b = var2; } public Value evaluate(){ if(!(this.a instanceof ArithmeticExpression) || !(this.b instanceof ArithmeticExpression)){ return null; } if(this.a == null || this.b == null){ return null; } Value test01 = this.a.evaluate(); Value test02 = this.b.evaluate(); Value difference01 = new IntegerValue(((IntegerValue)test01).intEvaluate()- ((IntegerValue)test02).intEvaluate()); return difference01; } }