Page 1282 - AP Computer Science A, 7th edition
P. 1282
the Bird class.
• Note that the noise for Owl will always be “hoot”. Thus,
noise does not need to be provided as a parameter in the SnowyOwl constructor. The statement super(owlName, “hoot”) will use the superclass—namely Bird—constructor to automatically assign “hoot” as an SnowyOwl’s noise. Similarly, the SnowyOwl does not need any parameters in its constructor: using the superclass (Owl) constructor will automatically provide it with its name through the statement super(“Snowy owl”).
• In part (b), polymorphism will determine which getFood method to print for the actual instance of each Bird in birdList.