Lesson 18 – “Has A” Object Containment

The object composition structure covered in the previous lesson is sometimes referred to as a “Has-A” relationship. For example, you can have two separate classes: one for “Wizard” and another for “Weapon.” You can then have an instance of the Weapon class within the Wizard class and say that the Wizard class “has a” Weapon object. This lesson covers that topic and in addition will briefly look at method returns.

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

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