// $Id: ExprSum.java,v 1.2 2002/09/09 22:06:59 leavens Exp leavens $
// Com S 362 homework

/** Expressions that are the sum of two arguments, like 3+4. */
public class ExprSum {
    protected ExprSum left_arg;
    protected ExprSum right_arg;

    /** Initialize this expression tree. */
    public ExprSum(ExprSum left, ExprSum right) {
        left_arg = left;
        right_arg = right;
    }

    /** Return the value of this expression. */
    public double value() {
        return left_arg.value() + right_arg.value();
    }

    /** Is the left argument strictly less than the right? */
    public boolean isLessThan() {
        return left_arg.value() < right_arg.value();
    }
    
}
