SHSubjectHub

Composition — Objects Inside Objects (Python)

OOPA-levelLesson packSubscription

About this resource

Understand the has-a relationship, how to design component classes, access nested attributes using chained dot notation, and build systems of collaborating objects.

12 slides.

Lesson outline

  1. Is-A or Has-A?
  2. Is-A vs Has-A
  3. The Component Class
  4. Chained Dot Notation
  5. Person + Address: Live Demo
  6. UML: Composition Relationship
  7. Lists of Objects
  8. Design: What Goes Where?
  9. Coding Practice: Person + Address / School
  10. Lesson Summary
Unit bundleUnit 4A · Composition — Objects Inside Objects
Part of: Unit 4A · Composition — Objects Inside Objects: the whole unitEvery resource in the unit in one zip.

More from Unit 4A · Composition — Objects Inside Objects