A sequence diagram is an interaction diagram that falls under the category of behavioral diagrams. As the name suggests, it shows the sequence of the activities of a system. By looking at a sequence diagram, you can identify which activities happen during a particular time frame and which activities come next. It allows us to understand the flow of a system. The activities it represents might be an interaction between a user and a system, between two systems, or between a system and a subsystem.
The horizontal axis of a sequence diagram shows time passing from left to right, while the vertical axis shows the flow of activity. Different activities are placed in the diagram in a sequential manner. A sequence diagram doesn't necessarily show the duration of time passing but rather the steps from one activity to another.
In the following sections, we'll...