Page 549 - AP Computer Science A, 7th edition
P. 549
(A) I only
(B) II only
(C) III only
(D) I and III only (E) I, II, and III
31. Refer to these declarations in a client program:
ThreeDigitInteger code = new ThreeDigitCode(127); ThreeDigitInteger num = new ThreeDigitInteger(456);
Which of the following subsequent tests will not cause an error?
if (code.isValid()) ...
if (num.isValid()) ...
if (((ThreeDigitCode) code).isValid()) ...
I II
III
(A) I only
(B) II only
(C) III only
(D) I and II only (E) I and III only
32. Consider the following hierarchy of classes: