Page 547 - AP Computer Science A, 7th edition
P. 547
III int secondBlank = fullName.indexOf(BLANK); firstName = fullName.substring(firstBlank + 1, secondBlank + 1);
(A) I only
(B) II only
(C) III only
(D) I and II only (E) I, II, and III
Ques t ions 29– 31 ref er t o t he ThreeDigitInteger and ThreeDigitCode classes below.
public class ThreeDigitInteger {
private int hundredsDigit; private int tensDigit; private int onesDigit; private int value;
/∗ ∗ @param aValue a 3-digit int ∗ / public ThreeDigitInteger(int aValue) { /∗ implementation not shown ∗/ }
/∗∗ @return the sum of digits for this ThreeDigitInteger ∗/
public int digitSum()
{ /∗ implementation not shown ∗/ }
/∗∗ @return the sum of the hundreds digit and tens digit ∗/
public int twoDigitSum()
{ /∗ implementation not shown ∗/ }
//Other methods are not shown. }
public class ThreeDigitCode extends ThreeDigitInteger
{
private boolean isValid;