OOP principle: generalisation
Finding the attributes and methods that several classes share and moving them into one more general parent class, so the code is not repeated in each specialised class.
Understanding OOP principle: generalisation in VCE Software Development U3O1
What it does: The shared attributes name and age are found in both classes and moved into the general Animal class. Dog reuses the parent's __init__ through super(), so the name and age code is written only once. The general class holds common features. The specialised class adds details for a specific type.
Common mistakes: The general parent class header is missing its colon. It should be class Animal: so the shared name attribute can be defined inside it. This only creates a local variable, so the shared attribute is never stored on the object. It should be self.reg = reg in the general parent class.
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 125–141) and word search (Modules 114–141).
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
generalisationFill in the Blanks
Spot the Error
Student with a class code? Join your class →