/* BinaryExpression.java */ /** A class representing any expression with two operands */ public abstract class BinaryExpression extends Expression { Expression left, right; public Expression operand(int i) { /* Fill in for part 1. */ } public int arity() { return 2; } public Value eval() { return eval(left.eval(), right.eval()); } /** Returns the value resulting from applying the operation * performed by this kind of BinaryExpression to two values. * @param v0 is the first operand. * @param v1 is the second operand. * @return the value of applying whatever operator this is to v0 and v1. */ abstract public Value eval(Value v0, Value v1); }