CS FundamentalsHardTCS NQT · Infosys pattern
An activity diagram shows a fork bar splitting one flow into two concurrent activities (ValidateAddress and ChargeCard), which later rejoin at a join bar before activity ShipOrder begins. What must be true before ShipOrder can start?
- A. Only one of the two activities needs to finish, whichever is faster
- B. ShipOrder starts as soon as the fork happens, in parallel with the other two
- C. The join bar is optional and has no effect on timing
- D. Both ValidateAddress and ChargeCard must complete; a join bar waits for all incoming concurrent flows to finish before releasing the outgoing flow
Correct answer: D. Both ValidateAddress and ChargeCard must complete; a join bar waits for all incoming concurrent flows to finish before releasing the outgoing flow
A join (unlike a decision/merge) synchronises concurrent flows: control does not pass beyond it until every incoming branch from the matching fork has completed. This differs from a simple merge node, which only needs one incoming flow to arrive.
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 class diagram shows Shape as an abstract class with an italicized name and an italicized method + area(): double, and Circle, Square as…
- In a sequence diagram, a long thin rectangle drawn on top of a lifeline is called an activation bar (execution occurrence). What does its…
- A class diagram shows Employee with attribute - salary: double and operation + getSalary(): double. What do the leading - and + symbols…
- A sequence diagram shows a loop combined fragment labelled loop [for each item in cart] wrapping a single message validateItem(item) sent…
- A class diagram shows Vehicle as a superclass with a generalization (hollow triangle arrow) pointing from Car and Truck up to Vehicle. If…
- Using basic COCOMO for a semi-detached project (E = 3 × KLOC^1.12 person-months), what is the estimated effort for a 45 KLOC project?