Software Development and Project Management
In UML, which diagram shows the messages (calls and replies) exchanged between several objects in time order from top to bottom?
- AActivity diagram
- BSequence diagram
- CClass diagram
Show answer and explanation
Answer: B. Sequence diagram
In a sequence diagram, a vertical line (lifeline) is drawn for each object, and the messages between them are drawn as arrows in time order. For example, it is used to check the order of an interaction in which an application calls a driver, the driver writes to a register of a peripheral, and completion is signaled by an interrupt. An activity diagram shows the flow of processing, including branches and concurrent processing, much like a flowchart. A class diagram shows the structure and relationships of classes rather than time order.
- A. This diagram shows the flow of processing, including branches and concurrency; it does not arrange messages between objects in time order.
- B. Correct. It shows the exchange of messages between objects in time order.
- C. This static diagram shows the structure and relationships of classes, not time order.
Continue: 9 more Software Development and Project Management questions