Take the 2-minute tour ×
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It's 100% free, no registration required.

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?)

share|improve this question

3 Answers 3

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 ...

share|improve this answer

You would also want to keep in mind that the state of an object is an "abstract" entity, as determined by what is observable by the methods. For instance, an object that implements a hash table has as its state, the collection of values stored in the hash table, not all the internal representation details.

share|improve this answer

http://docs.oracle.com/javase/tutorial/java/concepts/object.html follow the link ...you will clealy understand the difference between state and behaviour of an object

share|improve this answer
1  
Please provide answers that can stand on their own and not just a link that may be dead when a future visitor comes across your answer. –  FrankW Apr 27 at 20:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.