class BooleanConditionalExprHandler implements ConditionalExprHandler {
    ResolvedType thenExpr;
    ResolvedType elseExpr;

    public BooleanConditionalExprHandler(ResolvedType thenExpr, ResolvedType elseExpr) {
        this.thenExpr = thenExpr;
        this.elseExpr = elseExpr;
    }
    
    @Override
    public ResolvedType resolveType() {<FILL_FUNCTION_BODY>}
}

        if (thenExpr.isReferenceType() && elseExpr.isReferenceType()) {
            return thenExpr.asReferenceType();
        }
        return thenExpr.isPrimitive() ? thenExpr : elseExpr;
    
<no_super_class>