USE CASE DIAGRAM
A Use Case diagram is a high level diagram and it is also called as the mother of all diagrams. It is drawn as per the User perspective. It means that who all are the different users that are
going to use the proposed IT solution and the actions performed by them is shown in this diagram.
It is used to represent the functionality of the system from a top-down perspective. The actions must be illustrated in the order they are being performed by the users to complete a task. Use Case diagrams represents only the positive flow. If you want to illustrate the negative flow then you must create a separate Use Case diagram and it will be called as Misuse Case diagram.
Elements of a Use Case Diagram:
There are 4 major elements in Use Case diagrams:
- System Boundary
It is a rectangular box which represents the system as a whole which contains the entire Architecture, Screens, Business Logic and Databases.
- Actors
The users that are going to interact with the system are called as Actors. They can be a living or a non-living thing and are represented by a noun. They are of 2 types,
a) Primary Actors: They initiate the work or the actions performed in the system.
Ex: Customer
b) Secondary Actors: The System depends on Secondary Actors for information.
Ex: Bank Server
- Use Cases
The actions that are performed by the Actors are recorded in the form of Use Cases. They are represented in the form of an ellipse.
a) Essential Use Cases: It makes sense and completeness to the end user.
b) Supporting Use Cases: It makes sense and supports Essential Use Case.
- Relationships
These are the lines that are used to connect the elements of a Use Case diagram. The elements are the Actors and the Use Cases.
The various types of relationships used in a Use Case diagram:
- Generalization
It is called as “is a kind of” relationship. It shows the relationship between the parent class and the child class. The direction of arrow is based on dependency not according to the information flow. The arrow points towards the parent. They are of 2 types,
a) Actor Generalization
It represents the generalization relationship between the actors.
Ex: A “New Customer” is a kind of a “Customer”.
b) Use Case Generalization
It represents the generalization relationship between the Use Cases.
Ex: A “Payment” can be made by means of “cash”, “cheque” or “card”.
- Include
It shows that the parent class is not complete without the child class. It is compulsory.
- Extend
It shows that the parent class can exist without the child class. It is optional.
Steps to draw Use Case diagram from a Case Study
- Identify Actions from the information.
- Identify Actors.
- Identify which Actor is doing which Actions.
- Identify Essential and Supporting Use Cases.
- Draw System Boundary.
- Draw Identified Actors and Actions.