Page 511 - AP Computer Science A, 7th edition
P. 511
9056
(D) 2 7 9 5 8143 9056
(E) 5972 8143 6509
12. Consider a program to manipulate images. The inheritance hierarchy is as follows:
You may assume that Picture has a default (no-argument) constructor, but that Landscape and Portrait do not have any constructors. Which of the following declarations will compile?
I II
III
DigitalPicture p = new Portrait(); Landscape p = new Picture(); DigitalPicture p = new DigitalPicture();