An object is an instance of a class / belongs to a particular class and has individual characteristics. Many distinct instances be created from a single class.
Method
A method is a procedure on an object which can be invoked. A method may have parameters to pass additional information. All methods have return types / values, a method may return void if no information is being handed back to the caller.
A method implements the behaviour of objects, they have a consistent structure of a header and a body.
- The header describes:
- The visibility to objects of other classes.
- Whether the method returns a result.
- The name of the method.
- Whether the method takes parameters.
- The body encloses the body’s statements.
- The header describes:
Class Attribute
An object also has attributes, which are values stored in **fields**.
The class defines what fields an object has, but each object stores its own set.
Link to originalState
The state is the set of values of all fields of an object.
Link to originalMethod Signature
Method signature: Consists of the function prototype and any relevant types.
Link to original