CS FundamentalsHardInfosys · TCS

A UML state machine has the transition Idle → Processing labelled 'submit [cart not empty] / validateCart()'. What do the three parts mean?

  1. A. submit is the event, [cart not empty] is a guard that must be true for the transition to fire, and validateCart() is the action performed during the transition
  2. B. submit is the action, the bracket is a comment, validateCart() is the event
  3. C. All three are events that must occur in sequence
  4. D. The bracket is the target state

Correct answer: A. submit is the event, [cart not empty] is a guard that must be true for the transition to fire, and validateCart() is the action performed during the transition

The UML transition syntax is event [guard] / action. If the guard is false, the event is ignored in that state and the machine stays in Idle.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic