AP Computer Science 2.3 Program Development
Recommendation
Want a study guide too?
AP Computer Science 2.3 Program Development. What is correct implementation of the Emperor constructor method?
AP | AP Computer Science |
AP Computer Science | Program Development |
Computer Science | AP Computer Science |
Language | English Language |
Program Implementation | Implementation techniques |
Test Prep | AP Computer Science |
Transcript
member will be added for the age of the emperor
penguin Well the emperor subclass is implemented as followed right
here Okay what is the correct implementation for the emperor
constructor method All right okay here we go All right
noticed that my name variable is a private feel way
can only access it using the penguin class constructor Other
choices could be eliminated because we have to initialize both
the name and the age variable that leaves us with
troy See is our only answer Looking closer we can
tell that it correctly uses the super keyword to assign
the name variable and assigns the age variable You know
even if penguins can't fly well who says they can 00:01:09.165 --> [endTime] try