# Criterion 5 Component Guide: Object Descriptions
In VCE Software Development, an **object description** is a design tool used to define the structure of a class or object. It is a critical requirement for achieving a score in the **Very High (9–10 marks)** band under Criterion 5.
---
## 1. What is an Object Description?
An object description represents the blueprint of an object-oriented class. It is divided into three key elements:
1. **Class Name:** The identifier for the template (e.g., `Dog`, `User`, `Account`).
2. **Properties/Attributes:** The data values that instances of this class hold (e.g., name, age, status). Properties must include data types.
3. **Methods/Behaviours:** The functions or subroutines that operate on the object’s data, including any input parameters and return values.
---
## 2. Incorporating Object-Oriented Programming (OOP) Principles
To secure a 9–10 score, your object descriptions must display a strong understanding of the four core OOP principles:
### A. Abstraction
* **Definition:** Hiding complex code implementation details and exposing only what is necessary for the current context.
* **Design Application:** When designing a class, exclude unnecessary real-world attributes. For a `Dog` class in a vet management system, you need `intAge` and `strBreed`, but you do not need `strFavoriteToy`.
### B. Encapsulation
* **Definition:** Bundling attributes and methods into a single class and restricting direct access to the attributes.
* **Design Application:** Attributes must be set to `private` (accessible only within the class code). You must design public `getter` and `setter` methods to safely read and write to these private properties.
### C. Generalisation
* **Definition:** Identifying shared attributes and methods across multiple classes and extracting them into a shared parent class (Superclass).
* **Design Application:** If you have a `Dog` class and a `Cat` class that both have a `strName`, `intAge`, and `eat()` method, you extract these into a `Pet` superclass.
### D. Inheritance
* **Definition:** A mechanism where a subclass inherits attributes and methods from a superclass, promoting code reuse.
* **Design Application:** In your documentation, specify which classes inherit from others (e.g., `Dog (extends Pet)`). The subclass will inherit the properties of `Pet` and introduce its own specific properties (e.g., `boolTrained` or `bark()`).
---
## 3. Formatting and Notation
Use a clear table layout for each class. Standard UML symbols should be used to denote visibility:
* `private` attributes/methods are prefixed with a minus sign (`-`) or labeled "private".
* `public` attributes/methods are prefixed with a plus sign (`+`) or labeled "public".
### VCAA Generalisation & Inheritance Example:
#### Superclass: Pet
| Class Name | Pet |
| :--- | :--- |
| **Properties / Attributes** | `- strName` (String)<br>`- strBreed` (String)<br>`- intAge` (Integer)<br>`- strColour` (String) |
| **Methods** | `+ eat()` (void)<br>`+ make_noise()` (void)<br>`+ getName()` (String)<br>`+ setName(name: String)` (void)<br>`+ getAge()` (Integer)<br>`+ setAge(age: Integer)` (void) |
#### Subclass: Dog (inherits from Pet)
| Class Name | Dog (extends Pet) |
| :--- | :--- |
| **Properties / Attributes** | `- boolTrained` (Boolean) *[Specific to Dog]* |
| **Methods** | `+ bark()` (void) *[Specific to Dog]*<br>`+ wag_tail()` (void) *[Specific to Dog]*<br>`+ make_noise()` (void) *[Overrides Pet.make_noise()]*<br>`+ getTrained()` (Boolean)<br>`+ setTrained(trained: Boolean)` (void) |
#### Subclass: Cat (inherits from Pet)
| Class Name | Cat (extends Pet) |
| :--- | :--- |
| **Properties / Attributes** | `- boolDeclawed` (Boolean) *[Specific to Cat]* |
| **Methods** | `+ purr()` (void) *[Specific to Cat]*<br>`+ catch_mouse()` (void) *[Specific to Cat]*<br>`+ make_noise()` (void) *[Overrides Pet.make_noise()]* |
---
## 4. Student Check for Completeness
* Have you listed **data types** for all properties/attributes?
* Do all properties have corresponding **getter/setter** methods (to demonstrate Encapsulation)?
* Have you included **parameter names and types** inside the method parentheses (e.g., `setName(name: String)`)?
* Have you documented **return types** for methods (e.g., `getName()` returns `String`; operations that return nothing return `void`)?
* If your solution utilizes OOP, do you have a diagram or text describing the **inheritance hierarchy**?