← VCE Software Development U3O1

Writing an object description from a requirement

Names an object, its attributes with data types and its methods, using only what the requirement needs. Example: Student has name: string, age: integer, getAge().

Understanding Writing an object description from a requirement in VCE Software Development U3O1

What it does: The description includes only the attributes the requirement mentions (title and pages) and gives each a suitable data type and a getter method. getAge() and setAge(newAge) use camelCase with a verb first, which shows how to name methods that read and change the age attribute. Name is text (string) and age is a whole number (integer). Swapping the data types is a common mistake. Checking the description against the requirements shows that favouriteColour is irrelevant, so it should not be in the object description.

Common mistakes: An object is named with a singular, capitalised noun because it describes one item. It should be 'Student', not the lowercase plural 'students'. A title is text, so its data type must be string. It should be 'Attr: title: string'.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

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 10–47) and word search (Modules 10–71).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
A requirement says: 'The library records each book's title and number of pages.' Which object description fits best?
Book | title: string, pages: integer | getTitle(), getPages()Library | books: array | addBook()
Matches
Student | name, age | getAge(), setAge(newAge)
↓
The attributes have no data types. They should be written as name: string, age: integer.
Applying
Meanings
Term
object description
Meaning
Names an object, its attributes with data types and its methods, using only what the requirement needs. Example: Student has name: string, age: integer, getAge().
Practice
Book | title: string, pages: integer | isOnLoan(), setOnLoan(status)
Testing
Gaps
| name: string, age: integer | getAge()
Check Answer
Spots
1Object: students
2Attr: name: string

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Silverback Gorilla' badge — Savannah Master, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. A requirement says: 'The library records each book's title and number of pages.' Which object description fits best?
A. Book | title: string, pages: integer | getTitle(), getPages() ✓
B. Library | books: array | addBook()
The requirement is about what is recorded for each book, so the object is Book. Its attributes are title (string) and pages (integer).
2. Requirement: 'A student's name and age must be stored and the age can be changed.' Which description is correct?
A. Student | name: integer, age: string | getAge(), setAge(newAge)
B. Student | name: string, age: integer | getAge(), setAge(newAge) ✓
Name is text (string) and age is a whole number (integer). Swapping the data types is a common mistake.
3. Requirement: 'A pet shop tracks each dog's name and weight in kilograms.' Which attribute list is better?
A. name: string, weight: float, favouriteColour: string, owner: string
B. name: string, weight: float ✓
Only include attributes the requirement needs. Extra attributes like favouriteColour are not required, so leave them out.
4. Which method name follows camelCase for reading the attribute 'totalMarks'?
A. getTotalMarks() ✓
B. get_total_marks()
Use the same naming convention throughout. In camelCase the first word is lowercase and each later word starts with a capital letter. get_total_marks() uses snake_case.
5. Requirement: 'The system must show a car's registration and let the owner update its odometer reading.' Which methods suit the Car object?
A. getRegistration(), setOdometer(newReading) ✓
B. setRegistration(newReg), deleteCar(), driveToSchool()
The registration only needs to be shown, so it needs a getter. The odometer must be updated, so it needs a setter. The other methods are not in the requirement.

Match the Pairs

Student | name: string, age: integer | getAge(), setAge(newAge) → A complete object description: the object name, its attributes with data types, then its methods
name: string, age: integer → The attributes part of the description: each data item the object stores, with its data type
A requirement says a library must record each book's title and number of pages, so the object is Book and only those two attributes are needed → Book | title: string, pages: integer | getTitle(), getPages()
Methods are named with the same convention as the rest of the program (camelCase), starting with a verb such as get or set → Student | name: string, age: integer | getAge(), setAge(newAge)
Student | name, age | getAge(), setAge(newAge) → The attributes have no data types. They should be written as name: string, age: integer.
Student | name: string, age: integer, favouriteColour: string | getAge() → favouriteColour is not needed by the requirement. Only relevant attributes should be included, so it should be removed.

Key Term

object description
Names an object, its attributes with data types and its methods, using only what the requirement needs. Example: Student has name: string, age: integer, getAge().

Fill in the Blanks

1. Requirement: store a pet's name and age Pet | name: string, age: integer | getAge()
Hint: Type the object name the requirement is about, as a singular noun starting with a capital.
2. Requirement: an item has a name and cost Item | name: string, cost: float | getCost()
Hint: Type the data type that suits a cost that can include cents.
3. Requirement: show a dog's name Dog | name: string, age: integer | getName()
Hint: Type the camelCase method name that returns the name attribute.
4. Requirement: a cat's age can be changed Cat | age: integer | setAge(newAge)
Hint: Type the camelCase method name that changes the age attribute.
5. Requirement: store a car's make and year Car | make: string, year: integer | getYear()
Hint: Type the attribute name the requirement asks for that matches the method.

Spot the Error

Question 1
A Object: students
B Attr: name: string
C Attr: age: integer
D Method: getAge()
Line A — An object is named with a singular, capitalised noun because it describes one item. It should be 'Student', not the lowercase plural 'students'.
Question 2
A Object: Book
B Attr: title: integer
C Attr: pages: integer
D Method: getTitle()
Line B — A title is text, so its data type must be string. It should be 'Attr: title: string'.
Question 3
A Need: track a pet's name
B Object: Owner
C Attr: name: string
D Method: getName()
Line B — The requirement is about a pet's name, so the object to describe is Pet, not Owner. It should be 'Object: Pet'.
Question 4
A Object: pet_owner
B Attr: name: string
C Attr: phone: string
D Method: getPhone()
Line A — Object names use capitalised words joined together with no underscores, so snake case breaks the convention. It should be 'Object: PetOwner'.
Question 5
A Object: Product
B Attr: price
C Attr: stock: integer
D Method: getPrice()
Line B — Every attribute in an object description needs a data type. A price can have cents, so it should be 'Attr: price: float'.

Student with a class code? Join your class →