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 trial

iOS Object-Oriented Swift Inheritance Inheritance Terminology Review

Gustavs Gutmanis
Gustavs Gutmanis
2,022 Points

The last question asks if the subclass inherits all props & methods of its superclass. It doesn't inherit private ones.

While this might fly with complete beginners, I just wanted to mention that subclasses may not inherit all of the methods and properties of its superclass. Since some of them might be private. I realize that it might be counter-productive to let beginners answer "false" on that one, but I felt a little betrayed that I got a wrong answer there :)

2 Answers

Chris Shaw
Chris Shaw
26,676 Points

Hi Gustavs,

The question doesn't mentioned inheritance, it mentions does the subclass have access to methods and properties of it's super class which it does, the question doesn't place any context around public and private types.

Hope that helps.

Gustavs Gutmanis
Gustavs Gutmanis
2,022 Points

Thank you for the clarification

Gustavs Gutmanis
Gustavs Gutmanis
2,022 Points

Looks like I am unable to form a simple question in the title...