//Rule: Julie is a married women public static Expression getMarriedWomanExpression() { Expression julie = new TerminalExpression("Julie"); Expression married = new TerminalExpression("Married"); return(new AndExpression(julie, married)); }
//Rule: Robert and John are male public static Expression getMaleExpression() { Expression robert = new TerminalExpression("Robert"); Expression john = new TerminalExpression("John"); return(new OrExpression(robert, john)); }