AP Computer Science 2.3 Program Development

AP Computer Science 2.3 Program Development. What is correct implementation of the Emperor constructor method?

APAP Computer Science
AP Computer ScienceProgram Development
Computer ScienceAP Computer Science
LanguageEnglish Language
Program ImplementationImplementation techniques
Test PrepAP Computer Science

Transcript

00:23

member will be added for the age of the emperor

00:25

penguin Well the emperor subclass is implemented as followed right

00:30

here Okay what is the correct implementation for the emperor

00:37

constructor method All right okay here we go All right

00:42

noticed that my name variable is a private feel way

00:46

can only access it using the penguin class constructor Other

00:50

choices could be eliminated because we have to initialize both

00:53

the name and the age variable that leaves us with

00:56

troy See is our only answer Looking closer we can

00:59

tell that it correctly uses the super keyword to assign

01:02

the name variable and assigns the age variable You know

01:06

even if penguins can't fly well who says they can 00:01:09.165 --> [endTime] try