0
3.5kviews
Explain substate with example. OR Explain composite state diagram.

Subject: Object Oriented Modeling and Design

Difficulty: Medium

Marks: 4 Marks

1 Answer
0
152views

Composite state has sub states. A Sub state can be sequential or concurrent. Sequential sub states include states of things that change with the help of transition in a particular sequence. Concurrent sub states are the states that executes in parallel. They are independent of each other. In nested state diagram, each of a state can have sub state and sub states receive the outgoing transition from of its composite state.

enter image description here

The above state diagram shows automatic transition with composite state. Automatic transition can be done in reverse, neutral or forward direction. If it is in forward then it can be in first, second or third gear. Forward is a composite state that has three sub states as first, second and third. Selecting N in any forward gear shifts a transition from forward to neutral. Select F in neutral state causes a transition to forward state. The sub state first is the default initial state.

Please log in to add an answer.