Lesson 17 – Object Containment, Method Returns

When we create an object instance of a class as a field within a different class, it creates a structure called “object containment” or “object composition.” This is one of the ways in which we can make classes modular, allowing their object instances to import code for use within other classes. This brings with it benefits of abstraction, code reuse, and code separation of the individual purpose for each class.

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

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