OO State Transition Diagrams (PPT 18) Flashcards Preview

Object Oriented Analysis and Design > OO State Transition Diagrams (PPT 18) > Flashcards

Flashcards in OO State Transition Diagrams (PPT 18) Deck (9)
Loading flashcards...
1
Q

What is a state?

A

A condition or situation in the life of an object during which it satisfies some condition, performs some activity or waits for some event

2
Q

How can we find out a state of an object?

A

We can sometimes do this by looking at the value of an objects attributes

3
Q

When can an object change state?

A

It can only change state when an event occurs

4
Q

What are State Transitions?

A

They show movement from one state to another as a result of an event. Represented by direct lines between states, with the event that causes the change written as the name

5
Q

What are the three types of event?

A

Call or signal event
-The receipt of a message from one object in the system

Change event
-A condition becomes true within the object

Time event
-An amount of time has elapsed

6
Q

What is a State Transition Diagram?

A

A diagram that captures the lifecycle of an object

  • States the object can assume
  • Events/messages it can receive
  • Response to events
7
Q

How many state diagrams should you have?

A

In theory, one for each object but in reality, just model those with interesting states

8
Q

What are some other state diagram notations?

A

Reflexive notation
-Transitions may lead to the same state they started in

Conditions
-Specify conditions under which transition will take place or not

Actions
-What an object does in response to an event, shown as part of the transition

Activities
-Show the activity which an object performs for the duration of a certain state

Initial/Final States

  • Initial state shows starting point of life cycle (circle)
  • Final state shows end of life cycle (Circle with circle around it)
9
Q

What is the difference between Activities vs Actions?

A

Activities are ongoing while a state exists and can be interrupted by other events.