Skip to content
PlayOwl

Coding · Grade 8

Objects and Program Organization

Learners model the garden app with classes: they create objects from a class blueprint, write and trace __init__ and methods that use self, and build programs where objects contain and work with other objects, including the surprise of two variables referring to the same object. They finish by designing classes with single responsibilities, deciding which data and behaviour each class owns.

  • 4 lessons
  • About 85 minutes
  • Check what you learned: 8 questions
  • Ways to answer: choose an answer, put code in order, trace code, match pairs, type a number and sort into groups
Try it now (no account) One of the five free starter courses Open in PlayOwl

What learners will discover

  • Explain classes as blueprints and objects as instances that each store their own attribute values.
  • Write and trace __init__ and methods that use self to read and change an object's attributes.
  • Trace programs with several interacting objects, including containers of objects and shared references.
  • Organise a program into classes with clear responsibilities, choosing attributes and methods for each.

Lessons

  1. Classes and objects 5 steps2 practiceabout 20 min
  2. __init__, methods and self 6 steps4 practiceabout 22 min
  3. Many objects working together 6 steps4 practiceabout 22 min
  4. Organising a program with classes 5 steps3 practiceabout 18 min
  5. Check what you learned 8 questions at the end

Keep exploring

Games to practice with

More 8th grade coding

Guide for grown-ups