Updated FenceProblem and changed method name "withinConstraints()".