Lesson 19 – “Is A” Inheritance Containment

When the “Has-A” containment structure doesn’t suit the purpose you are looking for, you can instead turn to class inheritance in order to import code from outside classes. This structure is often referred to as an “Is-A” class relationship, meaning that the inheriting class is an extended version of the class it’s inheriting from. For example, you can have two classes – Wizard and Enemy – and relate them in a way where you can say a Wizard “Is A” type of Enemy. This has important implications for how we look at objects in later lessons.

Members Only Content (Source Code, Quiz, Q&A)

This content is for Extended Support Package members only.
Log In Register