Conclusion

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

Well done! You just learned how to use class inheritance, and the coding style of polymorphism. You should be proud of yourself!

This is an advanced lesson following the basics you learned in previous lessons. So, in the next few lessons, you’ll learn more specifically about inheritance, polymorphism and more. Finally, here are the key takeaway points from this lesson:

  • Through inheritance, a class automatically gets the properties and methods declared in the main class.
  • The hierarchies only go one way in inheritance.
  • The open keyword means that a main class is open to be inherited from.
  • A class that inherits from another class is known as a subclass or a derived class.
  • Polymorphism is a programming language’s ability to treat an object differently based on the context.
See forum comments
Download course materials from Github
Previous: Demo Next: Quiz: Leverage Inheritance