Glossary

I

Immutable

Criticality: 2

Describes a class or object whose state cannot be changed after it has been created. Such classes have no mutator methods.

Example:

A String object in Java is immutable; once you create it, you cannot change its characters, only create a new String.

M

Mutator methods (setter methods)

Criticality: 3

Methods that change the values of an object's instance variables, often by taking a new value as a parameter. They are also known as setter methods.

Example:

To update a player's score, you might call player.setScore(100);, which is a mutator method that modifies the score instance variable.

P

Parameter

Criticality: 3

A variable defined in the header of a method that receives a value when the method is called, allowing data to be passed into the method.

Example:

In public void setVolume(int level), level is a parameter that specifies the new volume setting.

R

Return type

Criticality: 3

The data type of the value that a method sends back to the caller after its execution. If a method does not return a value, its return type is `void`.

Example:

In public int getAge(), int is the return type, indicating the method will provide an integer value.

V

Void methods

Criticality: 3

Methods that do not return any value after their execution. They are typically used to perform an action or modify an object's state.

Example:

A printReport() method that displays information to the console but doesn't return data is a void method.