Question Bank 2 marks
UNIT-V 1) What are UML state machine diagrams?
Statechart Diagrams A UML statechart diagram, as shown in Figure 29.1, illustrates the interesting events and states of an object, and the behavior of an object in reaction to an event. Transitions are shown as arrows, labeled with their event. States are shown in rounded rectangles.
2) Define events,states,and transitions? Events, States, and Transitions An event is a significant or noteworthy occurrence. For example: A telephone receiver is taken off the hook. A state is the condition of an object at a moment in timethe time between events. For example: A telephone is in the state of being "idle" after the receiver is placed on the hook and until it is taken off the hook. A transition is a relationship between two states that indicates that when an event occurs, the object moves from the prior state to the subsequent state. For example: When the event "off hook" occurs, transition the telephone from the "idle" to "active" state. 3) Explain state machine diagram with an example.
A statechart diagram shows the lifecycle of an object: what events it experiences, its transitions, and the states it is in between these events.
4) What is transition action?
A transition can cause an action to fire. In a software implementation, this may represent the invocation of a method of the class of the statechart diagram.
5) What is guard condition?
A transition may also have a conditional guardor boolean test. The transition only occurs if the test passes.