Compare the Difference Between Similar Terms

Difference Between Use Case Diagram and Activity Diagram

The key difference between use case diagram and activity diagram is that the use case diagram helps to model the system and user interactions while the activity diagram helps to model the workflow of the system.

UML stands for Unified Modelling Language. It is different from other programming languages such as C, C++, Java. It helps to build a pictorial representation of the software system. Object Orientation is the most common methodology to develop software solutions. UML diagrams help to represent Object Oriented concepts. These diagrams help conceptual modelling and make it simple and easier to understand the system. There are various UML diagrams. Two of them are use case diagram and activity diagram.

CONTENTS

1. Overview and Key Difference
2. What is Use Case Diagram
3. What is Activity Diagram
4. Side by Side Comparison – Use Case Diagram vs Activity Diagram in Tabular Form
5. Summary

What is Use Case Diagram?

There are two UML modelling types. They are structured modeling and behavior modeling. Structured modelling describes the static features of the system while the behavior modelling describes the dynamic nature of the system. Use case diagram is a behavioral diagram.

A single use case represents the high-level functionality of a system. An ellipse represents a use case, and the name is written inside of it. An actor invokes a use case. It can be a person, another system or an organization who has the goal to use the system. Moreover, a rectangle represents the system boundary.

The user case diagram for an ATM is as follows.

Figure 01: Use Case Diagram

The customer is an actor. He performs use cases such as check balance, deposit cash and withdraws money. Lines represent the association between customer and the use cases. The bank is a secondary actor, and it performs the use case filling the ATM with cash. Furthermore, use case diagrams can also represent dependencies.

There are two dependencies called include and extends. When a use case requires the support of another use case, those two use cases have the dependency “include”. To withdraw money, the system should first verify the balance. Therefore, it is an include dependency. After checking balance, deposit money or withdraw money, the customer can print a receipt. It is not necessary, but it is possible. Therefore, those use cases and print receipt use case has the dependency “extends”. Overall, the use case diagram helps to model the context of the system.

What is Activity Diagram?

An activity diagram is another behavioral diagram. It similar to a flowchart that represents the flow from one activity to another activity. The activities are the various operations of the system. This diagram provides a high-level view of the system. An example activity diagram for student management is as follows.

Figure 02: Activity Diagram

The diagram starts with the initial node. The first step is to view student details. After that, there is a condition. A diamond symbol represents a condition. It checks whether the student exists or not. If the student is new, then the step is to create records for that new student.

Furthermore, if the student is already existing, there is another condition to check whether the student is still learning or not. If not, it is possible to delete the student records. And, if the student is still learning, then it is possible to update records.

Create, update and delete records join together using the joint symbol. This symbol combines more actions into one. Finally, the student details can be viewed. The end symbol indicates the completion of the flow of the process. That is an example activity diagram.

What is the Difference Between Use Case Diagram and Activity Diagram?

A use case diagram represents the user’s interaction with the system. On the other hand, an activity diagram represents the series of actions or flow control in a system similar to a flowchart. A use case diagram helps to model the system and user interactions while an activity diagram helps to model the workflow of the system. This is the main difference between use case diagram and activity diagram.

Summary – Use Case Diagram vs Activity Diagram

Use case diagram and activity diagram are behavioral UML diagrams that describe the dynamic nature of a system. The difference between use case diagram and activity diagram is that a use case diagram helps to model the system, user interactions while activity diagram helps to model the work flow of the system. These diagrams provide multiple advantages. They help to model business requirements and to get a high-level understanding of the functionality of the system.

Reference:

1.Tutorials Point. “UML – Activity Diagrams.” Tutorials Point, 8 Jan. 2018. Available here
2.Tutorials Point. “UML – Use Case Diagrams.” Tutorials Point, 8 Jan. 2018. Available here
3.“UML Activity Diagram Tutorial.” Lucidchart, 18 Apr. 2018. Available here