D.1.1 Outline the general nature of an object
objects often model or simulate real-world things.
Like real-world objects, an object has states/fields and behavior/responsibilities.
the state becomes fields or class variables, its behavior or responsibilities become class methods.
an object is a thing or entity that makes sense within the context of the problem
an object is an instance of a class
An object stores data and can perform actions and provide communication.
The state of an object refers to the data it stores(class members or variables).
The behavior of an object is defined by the action and communication it provides (methods).
A rectangle has length and width. A rectangle can set the values of its length and width, calculates its perimeter and area, and displays these information in a text (String) form.
Consider the object "Student".
Identify the state or fields of the "Student" object
Identify the behaviour or methods the "Student" object can do