pptx, 226.64 KB
pptx, 226.64 KB
docx, 91.06 KB
docx, 91.06 KB
pdf, 118.47 KB
pdf, 118.47 KB
docx, 91.24 KB
docx, 91.24 KB
pdf, 120.81 KB
pdf, 120.81 KB
docx, 90.09 KB
docx, 90.09 KB
jpg, 157.36 KB
jpg, 157.36 KB

This lesson finishes the OOP set by looking at objects that hold other objects. Students build a Team class in Python that stores a list of Player objects, then write methods that loop through the players and call their getters.

It separates ‘is a’ from ‘has a’ clearly, explains aggregation and composition with the diamond notation, and shows why changing a player through the team changes the very same object.

What’s included

  • 16-slide editable teacher PowerPoint, with speaker notes on every slide
  • Python starter code with guided TODOs and the full tested solution, in a Word file ready to copy into your editor (including a TopScorer() extension)
  • Student worksheet (32 marks) in Word and PDF: classifying relationships, tracking a team, fill-the-gap code, spot-the-errors and exam-style questions
  • Full answer key in Word and PDF

How the lesson runs

  • A starter on ‘is a’ versus ‘has a’
  • Containment, with an aggregation class diagram
  • Key vocabulary: aggregation, composition and references
  • Team, AddPlayer, TotalGoals and FindPlayer step by step
  • A spot-the-bug slide on returning None too early
  • A mini task tracking a team, with answers
  • Inheritance, aggregation and composition compared
  • A coding task, exam-style question with mark scheme, and exit ticket

Written for Cambridge International AS & A Level Computer Science (9618), Paper 4 Practical, and pitched at A Level (Year 13). Everything is editable, so you can adapt it for your own classes.

Please leave a review if you find it useful. It really helps!

Reviews

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.