Create a Child Class (Exercise)
00:00
Here’s your first review exercise. Create a child class, a GoldenRetriever
class that inherits from the Dog
class. And you use the following code for your parent Dog
class.
00:11 That’s the code that you’ve just explored in the previous lesson.
00:15
Use this Dog
class basically as a parent class to create a child class called GoldenRetriever
. We don’t have any more instructions on what this child class should do, so for now it’s enough if you just create an empty child class that inherits from the Dog
class.
00:30 That might be a quick one. Go ahead and solve the task and then move over to the next lesson, and I’ll do it there as well.
Become a Member to join the conversation.