Object Oriented (OO) Example


State/Attributes/Data

Creating an object to describe (model) a student, we might require the following data items: In object terminology, the pieces (or items or elements) of data which describe an object are referred to as the objects attributes. When an objects attributes are considered collectively during a single time period (that is a "snap-shot" of the attributes), this defines an objects state. For example, if we wish to determine if a student "is eligible for an academic scholarship in their major" (a singular state), we would likely consider the attributes:

Behavior/Operations/Methods

Using the object described above (a student), consider some of the potential behaviors, such as:

When discussing software objects, we define an objects behaviors (also called its operations) as

  1. the things the object does to access its attributes (data)

  2. the things the object does to modify/maintain its attribute (data) values

For example,