Page 1247 - AP Computer Science A, 7th edition
P. 1247

29. (B) ThreeDigitCode is a subclass of ThreeDigitInteger and therefore inherits all the public methods of ThreeDigitInteger except constructors. All of the statements other than B are false. For choice A, ThreeDigitInteger is the superclass and therefore cannot inherit from its subclass. For choice C, constructors are never inherited. For choice D, a subclass can access private variables of the superclass through accessor methods only. For choice E, a superclass cannot access any additional instance variables of its subclass.


































































































   1245   1246   1247   1248   1249