Tag Archives: p.isValid

Given: (Exhibit) It is required that if p instanceof Pair then p.isValid() returns true. Which is the

Given:It is required that if p instanceof Pair then p.isValid() returns true.Which is the smallest set of visibility changes to insure this requirement is met? A. left, right, setLeft, and setRight must be private. B. left and right must be private. C. setLeft and setRight must be protected. D. isValid must be public. Correct Answer: B

Given: (Exhibit) It is required that if p instanceof Pair then p.isValid() returns true. Which is the

Given:It is required that if p instanceof Pair then p.isValid() returns true.Which is the smallest set of visibility changes to insure this requirement is met? A. left and right must be private. B. left, right, setLeft, and setRight must be private. C. setLeft and setRight must be protected. D. isValid must be public. Correct Answer: A

Given: (Exhibit) It is required that if p instanceof Pair then p.isValid() returns true. Which is the

Given:It is required that if p instanceof Pair then p.isValid() returns true.Which is the smallest set of visibility changes to insure this requirement is met? A. setLeft and setRight must be protected. B. isValid must be public. C. left and right must be private. D. left, right, setLeft, and setRight must be private. Correct Answer: C