ShmoopTube

Where Monty Python meets your 10th grade teacher.

Search Thousands of Shmoop Videos

AP Computer Science 2.3 Program Development 195 Views


Share It!


Description:

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

Language:
English Language

Transcript

00:00

Thank you We sneak and here's your shmoop usually brought

00:05

to you by the penguin who was on trial His

00:08

lawyer requested low bail since he wasn't a flight risk

00:13

All right recall our penguin class Apply a sub classes

00:19

to be implemented for emperor penguins and a new data

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

Related Videos

AP Computer Science 1.2 GridWorld Case Study and APIs
493 Views

AP Computer Science 1.2 GridWorld Case Study and APIs. What is the direction of the actor?

AP Computer Science 1.4 Standard Algorithms
200 Views

AP Computer Science 1.4 Standard Algorithms. How many times will mystery be called for mystery(n) for n > 1?

AP Computer Science 2.3 Classes and Objects
191 Views

AP Computer Science 2.3 Classes and Objects. Which of the following is correct implementation of the Country class?

AP Computer Science 3.4 Inheritance, Abstraction, and Polymorphism
204 Views

AP Computer Science 3.4 Inheritance, Abstraction, and Polymorphism. Which of the following will satisfy the conditional if statement for boo, str,...

AP Computer Science 4.2 Standard Algorithms
191 Views

AP Computer Science 4.2 Standard Algorithms. What kind of algorithm is the following?