-The very last diagram that I want to discuss is - -2
-the state transition diagram. The state transition diagram is defined for - -3
-each relevant class in the system and basically shows the - -4
-possible live history of a given class or object. So what - -5
-does it mean to describe the life history? It means - -6
-that it describes the possible states of the class as defined - -7
-by the values of the class attributes. And it also describes - -8
-the events that cause a transition from one state to another. - -9
-Finally, it describes the actions that result from a state - -10
-change. So if you put all of this together you - -11
-can see how this can represent the whole history of - -12
-the class, from its creation to its destruction. So let me - -13
-discuss the transition diagram in more detail, and also provide - -14
-information about the notation used to represent them. We have - -15
-states, that are represented by ovals with a name. And - -16
-we have transitions marked by the event that triggers the transition. - -17
-What transitions indicate is the passage from one state to - -18
-another state as the consequence of some external stimuli. Notice - -19
-that not all events will cause a state transition. So - -20
-for example, some events might be consumed within a single state. - -21
-And we'll get to that in a second. But in - -22
-most cases, an event will trigger some state transition. Events - -23
-may also produce actions and they may also have attributes - -24
-which are analogous to parameters in a method call. And Boolean - -25
-conditions that guard the state transition that is prevented - -26
-from happening in the case the conditions are not - -27
-satisfied. States may also be associated with activities and - -28
-actions. Specifically, activities are operations performed by an object - -29
-when it is in a given state and that - -30
-takes time to complete. Actions, conversely, just like the - -31
-actions corresponding to an event are instantaneous operations that - -32
-are performed by an object. And can be triggered - -33
-on entry. So, when the object reaches a given state, - -34
-when the object exits that state, and also when a - -35
-specific event occurs. And in this case, this notation is - -36
-basically a shortcut for any event that will cause a - -37
-state transition that will bring the object back into the - -38
-same state. Since we have several actions and activities, it - -39
-is probably worthwhile clarifyinig the ordering of such actions and - -40
-activities. So the way in which these actions and activities - -41
-occur is, first of all, we have the actions on the - -42
-incoming transition, so this is performed first. Then if there is an - -43
-entry action that is the next action that would be performed, then - -44
-we have activity and event actions as appropriate. And finally exit actions. -- cgit 1.4.1