Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAjay Shah
Courses Plus Student 1,181 PointsI am not getting it.
help me with this problem.
1 Answer
Allan Clark
10,810 PointsThis is a question about inheritance. when a class inherits from or 'extends' another class it is said to have an 'is-a' relationship. As in, child class 'is a' parent class. so since in the Duck class declaration we see:
class Duck extends Toaster {
then yes a Duck 'is a' Toaster.
They intentionally use nonsense nouns for this example to show its not the name of the classes that is important, it is the relationship that the keyword 'extends' represents.
KRIS NIKOLAISEN
54,971 PointsKRIS NIKOLAISEN
54,971 PointsCan you post the question? Note: They may be randomized so it's best if you post the question itself.