CS FundamentalsHardInfosys · TCS
A UML state machine has the transition Idle → Processing labelled 'submit [cart not empty] / validateCart()'. What do the three parts mean?
- 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
- B. submit is the action, the bracket is a comment, validateCart() is the event
- C. All three are events that must occur in sequence
- 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.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- A team draws one UML diagram showing which artefacts (JARs, containers) run on which nodes (servers, devices) and how the nodes…
- Using Robert Martin's Stable Dependencies Principle, package A has instability I = 0.2 and package B has I = 0.8. Which dependency…
- What is the cyclomatic complexity of this function, counting each simple condition separately and each loop header as one decision? python…
- A team wants its HTTP API to allow safe retries of PUT /users/42 with the full user body. Which property of PUT makes this safe, and what…
- Putnam's software equation implies that, for a fixed size and process productivity, effort varies as 1/t^4, where t is the development…
- A project has BAC = ₹500 lakh, PV = ₹240 lakh, EV = ₹200 lakh and AC = ₹250 lakh. If both cost and schedule performance are expected to…