OOP principle: inheritance
Inheritance: the child (sub) class reuses the parent (super) class's attributes and methods and can add or change its own, showing an is-a relationship.
Understanding OOP principle: inheritance in VCE Software Development U3O1
What it does: The child class name comes first and the parent class goes in brackets, which models the is-a relationship. Dog has no eat() method of its own, so the call works only because Dog inherits eat() from its parent, which avoids rewriting it. Inheritance models an 'is-a' relationship. A Dog is a kind of Animal, so Dog can inherit from Animal. A Student is a Person (is-a). A Car has wheels (has-a), so inheritance does not suit Car and Wheel.
Common mistakes: A parent class is created with the class keyword, not def. It should be 'class Animal:' so that Dog can inherit from it. The parent class name in brackets must match exactly. Python is case sensitive, so 'shape' is undefined. It should be 'class Circle(Shape):'.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 142–155) and word search (Modules 142–166).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
class Child(Parent):Fill in the Blanks
Spot the Error
Student with a class code? Join your class →