/** A binary boolean expression has a left hand side, a right hand side (both boolean expressions) and an operator, either v (or) ^ (and) or > (implies) */ public class BinaryBooleanExpression extends BooleanExpression { private BooleanExpression left=null; private BooleanExpression right=null; private char op='^'; // ^ for and, v for or, and > for implies /** evaluate both sides and combine */ public boolean value() { switch (op) { case '^': return left.getValue() && right.getValue(); case 'v': return false; // @@@ STUB ... fix case '>': return false: // @@@ STUB ... fix return not left or right default: throw new Exception(""); } } /** */ public String toString() { // return "(" + left.toString() + " " + Character.toString(op) + " " + right.toString() + ")" ; ???? return "STUB!!!"; } }