HiveBrain v1.2.0
Get Started
← Back to all entries
patternModerate

Definition of the state of an object in OOP

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
definitionthestateobjectoop

Problem

I need a concise definition of the "state of an object" in object-oriented programming (for a paper).

For about half of a day I searched for a paper that I can cite on this topic, but I couldn't find one. All the papers I found were mostly general papers on object-oriented programming and they didn't define the state of an object.

I am unsure, but my best guess is something like:
The state of an object is defined by the state of the instance variables of the object.

I am searching for a definition of the state of an object and/or a reference on the topic.

(btw, could I refer to the concept as "object state" or is this uncommon?)

Solution

You can take a look to (and cite) the book "Object-Oriented Analysis and Design" by G. Booch:


... An object is an entity that has state, behavior, and identity. The structure and
behavior of similar objects are defined in their common class. The terms instance
and object are interchangeable.


We will consider the concepts of state, behavior, and identity in more detail in the
sections that follow.
...

And there is a whole subsection that describes the concept of state:


... From this example, we may form the following low-level definition.


The state of an object encompasses all of the (usually static) properties of the
object plus the current (usually dynamic) values of each of these properties
...

Context

StackExchange Computer Science Q#6536, answer score: 11

Revisions (0)

No revisions yet.