Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between activity diagram and sequence diagram?

Tags:

uml

I'm studying UML and I am confused. What's the difference between activity diagram and sequence diagram? I haven't got the crucial point yet.

like image 724
guo Avatar asked Jul 04 '16 11:07

guo


People also ask

What is the difference between sequence diagram and class diagram?

A class diagram shows a set of classes, interfaces and their relationships and illustrates the static design view of a system, while a sequence diagram shows the sequence of actions that occurs in a system and illustrates the dynamic view of a system.

What is the difference between activity diagram and flowchart?

The main difference between activity diagram and flowchart is that an activity diagram is a UML behavior diagram that represents the workflow of stepwise activities of the system while a flowchart is a graphical diagram that represents the sequence of steps to solve a problem. UML stands for Unified Modeling Language.

What is activity diagram?

What is an Activity Diagram? An activity diagram visually presents a series of actions or flow of control in a system similar to a flowchart or a data flow diagram. Activity diagrams are often used in business process modeling. They can also describe the steps in a use case diagram.

What is a sequence diagram?

A sequence diagram is a Unified Modeling Language (UML) diagram that illustrates the sequence of messages between objects in an interaction. A sequence diagram consists of a group of objects that are represented by lifelines, and the messages that they exchange over time during the interaction.


2 Answers

They are both behavioral diagrams but have different emphases.

  • Activity diagram is good at depicting the control flowing from one activity to another, especially good at the logic of conditional structures, loops, concurrency.
  • Sequence diagram is good at depicting the sequence of messages flowing from one object to another, how their messages/events are exchanged in what time-order.

Notice that sequence diagram may also express conditions, loops and concurrency by using guards, but they are not as intuitive and convenient as those in activity diagram.

like image 88
Young Avatar answered Oct 17 '22 03:10

Young


Activity diagrams represents the flow of use cases. But sequence diagrams represents the interaction between classes or objects according to time.So there is a difference between these two diagrams.

Before moving to activity diagrams you need to draw the use case diagram. using use case(system behaviour) diagram you can identify activities(behaviours).

Then you need to draw the the activity diagram to show the flow of behaviours.

then You need to identify the classes and draw the class diagram.

Using class diagram you can draw the sequence diagrams to show the interaction between classes.

  1. use case diagram
  2. activity diagram
  3. class diagram
  4. sequence diagram
like image 36
dulaj sanjaya Avatar answered Oct 17 '22 02:10

dulaj sanjaya