![]() The ‘ internal’ state could be defined as the state of the representation. ![]() In any case, a mathematical approach is then to define a state as an equivalence class of ![]() This enclosing system may be required to be a self-contained system, capable of execution independent of its environment on the other hand, one could allow it to be as small as the object in question itself. One way to formalise this is to say that two states of an object are the same if all possible future executions of some system in which it is embedded result in the same mapping from inputs to that system to outputs from it. A difficulty with this is that ‘how it reacts’ may need to defined in terms of values returned, and these ‘values’ might be the states of other objects. For an object as a class instance this definition depends on the type to which the object is seen as belonging: seen as a Circle, the colour of a Coloured_Circle is not visible, and hence irrelevant to its state. how it reacts to method invocations or to a user interface. The ‘ external’ or ‘ functional’ state could be defined as ‘how it behaves’, ee.g. Unless the implementation language does allow us to distinguish different types of link, it will not be possible make a general definition of the state of an object in terms of the language alone. Further, a Car may have a link to an Registering_Authority – we probably do not consider the state of car to change when its registering authority changes the URL of its website. In these various cases we must decide whether we consider the state of one object to include that of the linked objects. For example, a linked list of Car will consist of a number of Link-objects, which contain pointers to the next (and maybe previous) Link although conceptually the list is a single object the links may also be embedded in Car-objects or contain pointers to them, but in this case the linked objects are conceptually separate rather than part of the list in a list of recent changes, hoewever, the changes may only be present in the list and considered as part of it. Part of the difficulty in defining the state of an object in OOP is that when we model entities in a particular language, that language often does not permit us to distinguish object attributes which are conceptually part of the same entity from others that are not. some entity you are trying to model, or about an instance of a class in a specific programme perhaps you also want to think about the state of a variable which could at different times refer to different objects or about a system, maybe as accessed via a certain user interface. In the following I do not offer a unique definition of the state of an object but rather try to sketch a number of ways of thinking about it, which may be appropriate in different contexts.įirst, however, you need to think what you mean by ‘ object’: are you thinking about a conceptual object, i.e. It was therefore important that you include a definition in your paper, to make quite clear how you were using the term. The term ‘ state’ may be used in various senses, which may not even all be susceptible of a precise definition. I don't think it gets any simpler than that. If someone were to ask, "What is your current state?" You could say today that you are married and tomorrow you could be single.Ĭonsidering all these definitions one can extrapolate that 'state' is the way that an object exists at a particular point in time determined by the values of its attributes, namely it's properties/variables. The common denominator of all these is time. Webster's New World College Dictionary defines 'state' as:Ī set of circumstances or attributes characterizing a person or thing at a given time way or form of being: condition They don't specifically state that they are related to Object Oriented Programming but one can extrapolate and use them in that context.ĭef 3: A stage in the lifecycle of an object that identifies the status of that object.ĭef 5: A condition or situation during the life of an object during which it satisfies some condition, performs some activity, or waits for some event.ĭef 8: An object's characteristic that is manifested in its public and private data members, and can be divided into two categories: essential state and non-essential state.ĭef 9: In a business state machine, one of several discrete individual stages that are organized in sequence to compose a business transaction.ĭef 10: A condition in which the circuit remains until application of a suitable pulse. IBM has a glossary that defines the word "state" in several different definitions that are very similar to one another.
0 Comments
Leave a Reply. |