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
- Is-A or Has-A?
- Is-A vs Has-A
- The Component Class
- Chained Dot Notation
- Person + Address: Live Demo
- UML: Composition Relationship
- Lists of Objects
- Design: What Goes Where?
- Coding Practice: Person + Address / School
- Lesson Summary
Unit bundleUnit 4A · Composition — Objects Inside Objects


