class PrecedenceTest {
  public static boolean needsBrackets(ValueBox subExprBox, Value expr) {<FILL_FUNCTION_BODY>}

  public static boolean needsBracketsRight(ValueBox subExprBox, Value expr) {
    Value sub = subExprBox.getValue();
    if (!(sub instanceof Precedence)) {
      return false;
    }
    Precedence subP = (Precedence) sub;
    Precedence exprP = (Precedence) expr;
    return subP.getPrecedence() <= exprP.getPrecedence();
  }
}

    Value sub = subExprBox.getValue();
    if (!(sub instanceof Precedence)) {
      return false;
    }
    Precedence subP = (Precedence) sub;
    Precedence exprP = (Precedence) expr;
    return subP.getPrecedence() < exprP.getPrecedence();
  
<no_super_class>