Choosing properties and methods for a class from a scenario
Read the scenario: nouns (data to store) become properties and verbs (actions) become methods. Keep only the details the program needs and leave the rest out.
Understanding Choosing properties and methods for a class from a scenario in ACARA Digital Technologies Years 9–10
What it does: Each noun the program needs becomes a property, set inside the constructor. Verbs describe what the object does, so they are written as methods inside the class. Nouns that describe stored data, like name and score, become properties. Words like 'has' are not data. Borrowing is an action, so it becomes a method. The title is data, so it is a property. Keep only the details the program needs. Extra data makes the class harder to read and maintain. The noun balance is stored data (a property). Deposit and withdraw are actions (methods). The vet's phone number is not used by the program, so it is left out. The name is needed to show each pet.
Common mistakes: A class declaration does not take parentheses after its name. The class that holds the Pet's properties (name, age) should start with class Pet {. The method that sets up the properties must be spelled constructor. With the typo, JavaScript treats it as an ordinary method and the properties are never set when you use new.
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 743–781) and word search (Modules 743–809).
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
properties and methodsFill in the Blanks
Spot the Error
Student with a class code? Join your class →