
Composition and aggregation lesson for IB Diploma Computer Science (first assessment 2027), with editable PowerPoint slides, a student worksheet and full answers. Composition and aggregation are ways one class contains another; composition ties the parts’ life to the whole, but aggregation does not.
Written for the 2027 IB Computer Science guide, unit B3 Object-oriented programming (HL only). Everything is editable, so you can adapt it to your class.
What’s included- PowerPoint lesson (12 slides) with speaker notes on every slide
- Student worksheet (Word), ready to print or edit
- Answer sheet (Word) with model answers for every question
By the end of the lesson students can:
- Explain “has-a” relationships: composition and aggregation
- Write Python classes that show each relationship
- Choose between composition, aggregation and inheritance for a design
Worksheet sections: A. Key ideas; B. Sort them; C. Model a library; D. Spot the relationship; E. Challenge
Every lesson includes- Learning goals and a starter question
- Clear explanations with worked examples (Python where code is needed)
- A quick check and a “your turn” task linked to the worksheet
- An exit ticket
- PowerPoint (.pptx) and Word (.docx), fully editable
- Works in PowerPoint and Google Slides
- Calm pastel design, consistent across the whole IB course
These are independent resources written for the IB Diploma Programme Computer Science guide (first assessment 2027). They are not produced or endorsed by the International Baccalaureate Organization.
More lessons in this series- Previous lesson: Abstraction in OOP – IB Computer Science lesson
- Next lesson: Design patterns – IB Computer Science lesson
- Save with the bundle: Object-Oriented Programming – IB Computer Science (10 lessons)
Last updated: November 2026.
Get this resource as part of a bundle and save up to 27%
A bundle is a package of resources grouped together to teach a particular topic, or a series of lessons, in one place.
Something went wrong, please try again later.
This resource hasn't been reviewed yet
To ensure quality for our reviews, only customers who have purchased this resource can review it
Report this resourceto let us know if it violates our terms and conditions.
Our customer service team will review your report and will be in touch.