Week-4 Use case diagrams
A use case diagram is a diagram that shows a set of use cases and actors and
their relationships.
Contents
Use case diagrams commonly contain
• Use cases
• Actors
• Dependency, generalization, and association relationships
• Include and Extend
Include: Use case include is a directed relationship between two use cases which
is used to show that behavior of the included use case (the addition) is inserted
into the behavior of the including (the base) use case. The stereotype
"<<include>>" identifies the relationship as an include relationship.
The include relationship could be used:
• to simplify large use case by splitting it into several use cases,
• to extract common parts of the behaviors of two or more use cases.
Example:
Extend: Extend is a directed relationship that specifies how and when the
behavior defined in usually supplementary (optional) extending use case can be
inserted into the behavior defined in the extended use case. The stereotype
"<<extends>>" identifies as an extend relationship.
Example:
Common Uses
The use case diagrams are used to model the static use case view of a system.
This view primarily supports the behaviour of a system - the outwardly visible
services that the system provides in the context of its environment.
1) NAME OF EXPERIMENT: Use case diagram for ATM System.
AIM: To design and implement ATM System through Use case Diagram.
Purpose: The purpose of use case diagram is to capture the dynamic aspect of a
system. Use case diagrams are used to gather the requirements of a system
including internal and external influences.
These requirements are mostly design requirements. So, when a system is
analysed to gather its functionalities use cases are prepared and actors are
identified.
So, in brief, the purposes of use case diagrams can be as follows:
• Used to gather requirements of a system.
• Used to get an outside view of a system.
• Identify external and internal factors influencing the system.
• Show the interacting among the requirements are actors.
Procedure:
Step1: First an Actor is Created and named as User/Customer.
Step2: Secondly a system is created for ATM.
Step3: A use case Enter PIN, withdraw money is created and connected with
user as association relationship.
Step4: Similarly various use cases like Deposit money, Balance Enquiry,
Manage Account etc. are created and appropriate relationships are associated
with each of them.
Inferences:
1. Identification of use cases.
2. Identification of actors.
2) Library Management System
borrow books
check availability of books
return books
Librarian
<<include>>
Member issue book
pay fine. <<include>>
verify member
renewal books
add member
Staff Student
remove member
add books
delete books