SlideShare a Scribd company logo
USE CASE DIAGRAMS
Use case diagram
Use case diagram is a behavioral UML diagram type and frequently
used to analyze various systems. They enable us to visualize
the different types of roles in a system and how those roles
interact with the system. 
Importance of Use Case Diagrams
As mentioned before use case diagram are used to gather a usage
requirement of a system. Depending on your requirement you
can use that data in different ways. Below are few ways to use
them.
• To identify functions and how roles interact with them – The
primary purpose of use case diagrams.
• For a high level view of the system – Especially useful when
presenting to managers or stakeholders. You can highlight the
roles that interact with the system and the functionality provided
by the system without going deep into inner workings of the
system.
• To identify internal and external factors – This might sound
simple but in large complex projects a system can be identified as
an external role in another use case.
Use Case Diagram objects
Use case diagrams consist of 4 objects.
1.Actor
2.Use case
3.System
4.Package
• Actor
Actor in a use case diagram is any entity that performs a role in
one given system. This could be a person, organization or an
external system.
• Use Case
A use case represents a function or an action within the system.
Its drawn as an oval and named with the function.
• System
System is used to define the scope of the use case and drawn
as a rectangle. Create all the use cases and then use the
system object to define the scope covered by your project. Or
we can even use it to show the different areas covered in
different releases.
• Package
Package is another optional element that is extremely useful in
complex diagrams. Similar to class diagrams, packages
are used to group together use cases. They are drawn like
the image shown below.
Relationships in Use Case Diagrams
• There are five types of relationships in a use case diagram.
They are:
1. Association between an actor and a use case
2. Generalization of an actor
3. Extend relationship between two use cases
4. Include relationship between two use cases
5. Generalization of a use case
Association Between Actor and Use Case
• This one is straightforward and present in every use case diagram.
• An actor must be associated with at least one use case.
• An actor can be associated with multiple use cases.
• Multiple actors can be associated with a single use case.
Different ways association relationship appears in use case diagrams
Generalization of an Actor
• Generalization of an actor means that one actor can inherit the role of
an other actor. The  descendant inherits all the use cases of the
ancestor. The descendant have one or more use cases that are specific
to that role.
A generalized actor in an use case diagram
Extend Relationship Between Two Use Cases
• As the name implies it extends the base use case and adds
more functionality to the system. Here are few things to
consider when using the <<extend>> relationship.
• The extending use case is dependent on the extended
(base) use case. In the below diagram the “Calculate
Bonus” use case doesn’t make much sense without the
“Deposit Funds” use case.
• The extending use case is usually optional and can be
triggered conditionally. In the diagram you can see that
the extending use case is triggered only for deposits over
10,000 or when the age is over 55.
• The extended (base) use case must be meaningful on its
own. This means it should be independent and must not
rely on the behavior of the extending use case.
Extend relationship in use case diagrams
Include Relationship Between Two Use Cases
• Include relationship show that the behavior of the
included use case is part of the including (base) use case.
The main reason for this is to reuse the common
actions across multiple use cases. Few things to consider
when using the <<include>> relationship.
• The base use case is incomplete without the included use
case.
• The included use case is mandatory and not optional.
• Lest expand our banking system use case diagram to show
include relationships as well.
Includes is usually used to model common behavior
Generalization of a Use Case
• This is similar to the generalization of an actor. The
behavior of the ancestor is inherited by the descendant.
This is used when there are common behavior between
two use cases and also specialized behavior specific to
each use case.
• For example in the previous banking example there might
be an use case called “Pay Bills”. This can be generalized
to “Pay by Credit Card”, “Pay by Bank Balance” etc.
How to Create a Use Case Diagram
Identifying Actors
• Actors are external entities that interact with your system. It can be a
person, another system or an organization. In a banking system
the most obvious actor is the customer. Other actors can be bank
employee or cashier depending on the role we are trying to show in
the use case.
• An example of an external organization can be the tax authority or the
central bank. Loan processor is a good example of external system
associated as an actor.
Identifying Use Cases
• Now it’s time to identify the use cases. A good way to do this is to
identify what the actors needs from the system. In a banking system a
customer will need to open accounts, deposit and withdraw funds,
request check books and similar functions. So all of these can be
considered as use cases.
• Top level use cases should always provide a complete functions
required by an actor. You can extend or include use cases depending
on the complexity of the system.
How to Create a Use Case Diagram (cont..)
• Look for Common Functionality to use Include
Look for common functionality that can be reused across the system. If you
find two or more use cases that share common functionality you can
extract the common functions and add it to a separate use case. Then
you can connect it via the include relationship to show that its always
called when the original use case is executed.
• Is it Possible to Generalize Actors and Use Cases
There maybe instances where actors are associated with similar use cases
while triggering few use cases unique only to them. In such instances
you can generalize the actor to show the inheritance of functions. You
can do a similar thing for use case as well.
• Optional Functions or Additional Functions
There are some functions that are triggered optionally. In such cases you
can use the extend relationship and attach and extension rule to it. In
the below banking system example “Calculate Bonus” is optional and
only triggers when a certain condition is matched.
Uml diagrams usecase

More Related Content

What's hot

Behavioural modelling
Behavioural modellingBehavioural modelling
Behavioural modelling
Benazir Fathima
 
Use case diagram
Use case diagramUse case diagram
Use case diagram
City University
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationships
Pooja mittal
 
Architectural Modeling
Architectural ModelingArchitectural Modeling
Architectural Modeling
AMITJain879
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
LOKENDRA PRAJAPATI
 
INTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSINTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMS
Ashita Agrawal
 
System Models in Software Engineering SE7
System Models in Software Engineering SE7System Models in Software Engineering SE7
System Models in Software Engineering SE7
koolkampus
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
Sudarsun Santhiappan
 
Uml deployment diagram
Uml deployment diagramUml deployment diagram
Uml deployment diagram
Asraa Batool
 
Unit iv
Unit ivUnit iv
Unit iv
TPLatchoumi
 
state modeling In UML
state modeling In UMLstate modeling In UML
state modeling In UML
Kumar
 
Lecture#02, building blocks of uml ASE
Lecture#02, building blocks of uml ASELecture#02, building blocks of uml ASE
Lecture#02, building blocks of uml ASE
babak danyal
 
State Machine Diagram
State Machine DiagramState Machine Diagram
State Machine Diagram
Niloy Rocker
 
Architectural styles and patterns
Architectural styles and patternsArchitectural styles and patterns
Architectural styles and patterns
Himanshu
 
UML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionUML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussion
CherryBerry2
 
Presentation on uml
Presentation on umlPresentation on uml
Presentation on uml
Shruti Dalela
 
Sequence diagram- UML diagram
Sequence diagram- UML diagramSequence diagram- UML diagram
Sequence diagram- UML diagram
Ramakant Soni
 
Component Diagram
Component DiagramComponent Diagram
Component Diagram
Ahmed Yousef
 
Uml in software engineering
Uml in software engineeringUml in software engineering
Uml in software engineering
Mubashir Jutt
 
Introduction to UML
Introduction to UMLIntroduction to UML

What's hot (20)

Behavioural modelling
Behavioural modellingBehavioural modelling
Behavioural modelling
 
Use case diagram
Use case diagramUse case diagram
Use case diagram
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationships
 
Architectural Modeling
Architectural ModelingArchitectural Modeling
Architectural Modeling
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
 
INTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSINTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMS
 
System Models in Software Engineering SE7
System Models in Software Engineering SE7System Models in Software Engineering SE7
System Models in Software Engineering SE7
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Uml deployment diagram
Uml deployment diagramUml deployment diagram
Uml deployment diagram
 
Unit iv
Unit ivUnit iv
Unit iv
 
state modeling In UML
state modeling In UMLstate modeling In UML
state modeling In UML
 
Lecture#02, building blocks of uml ASE
Lecture#02, building blocks of uml ASELecture#02, building blocks of uml ASE
Lecture#02, building blocks of uml ASE
 
State Machine Diagram
State Machine DiagramState Machine Diagram
State Machine Diagram
 
Architectural styles and patterns
Architectural styles and patternsArchitectural styles and patterns
Architectural styles and patterns
 
UML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionUML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussion
 
Presentation on uml
Presentation on umlPresentation on uml
Presentation on uml
 
Sequence diagram- UML diagram
Sequence diagram- UML diagramSequence diagram- UML diagram
Sequence diagram- UML diagram
 
Component Diagram
Component DiagramComponent Diagram
Component Diagram
 
Uml in software engineering
Uml in software engineeringUml in software engineering
Uml in software engineering
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 

Similar to Uml diagrams usecase

Lab 3 Introduction to the UML - how to create a use case diagram
Lab 3 Introduction to the UML - how to create a use case diagramLab 3 Introduction to the UML - how to create a use case diagram
Lab 3 Introduction to the UML - how to create a use case diagram
Farah Ahmed
 
Use Case Diagram.pptx
Use Case Diagram.pptxUse Case Diagram.pptx
Use Case Diagram.pptx
Genta Sahuri
 
05 use case
05 use case05 use case
05 use case
Baskarkncet
 
Presentation Use Case Diagram and Use Case Specification.pptx
Presentation Use Case Diagram and Use Case Specification.pptxPresentation Use Case Diagram and Use Case Specification.pptx
Presentation Use Case Diagram and Use Case Specification.pptx
azida3
 
Lesson02_Use Case Diagrams
Lesson02_Use Case DiagramsLesson02_Use Case Diagrams
Lesson02_Use Case Diagrams
Marwa Ali Eissa
 
SE_RE-II-CH5 (3).pdf
SE_RE-II-CH5 (3).pdfSE_RE-II-CH5 (3).pdf
SE_RE-II-CH5 (3).pdf
AZKANAAZ1
 
Unified Modeling Language in Software Engineering
Unified Modeling Language in Software EngineeringUnified Modeling Language in Software Engineering
Unified Modeling Language in Software Engineering
simmis5
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
AMITJain879
 
[RPL2] Pertemuan 3 - UML dan USECASE VIEW
[RPL2] Pertemuan 3 - UML dan USECASE VIEW[RPL2] Pertemuan 3 - UML dan USECASE VIEW
[RPL2] Pertemuan 3 - UML dan USECASE VIEW
rizki adam kurniawan
 
Use Case Modelling.pptx
Use Case Modelling.pptxUse Case Modelling.pptx
Use Case Modelling.pptx
azida3
 
Use Case Analysis and Diagramming
 Use Case Analysis and Diagramming Use Case Analysis and Diagramming
Use Case Analysis and Diagramming
Ornella Dunn
 
Use case modeling
Use case modelingUse case modeling
Use case modeling
Wajahat Hasnain
 
Lecture no 8 use case modeling and use case diagrams
Lecture no 8 use case modeling and use case diagramsLecture no 8 use case modeling and use case diagrams
Lecture no 8 use case modeling and use case diagrams
naveed428
 
Lecture 3 cst205 cst281-oop
Lecture 3 cst205 cst281-oopLecture 3 cst205 cst281-oop
Lecture 3 cst205 cst281-oop
ktuonlinenotes
 
usecase (1).pptx
usecase (1).pptxusecase (1).pptx
usecase (1).pptx
Nadir438180
 
Use Cases
Use CasesUse Cases
Use Cases
Juan Dominguez
 
Use Cases
Use CasesUse Cases
Use Cases
Juan Dominguez
 
Unit 3
Unit 3Unit 3
Use case diagrams
Use case diagramsUse case diagrams
Use case diagrams
Fajar Baskoro
 
Use case diagrams
Use case diagramsUse case diagrams
Use case diagrams
mohamed tahoon
 

Similar to Uml diagrams usecase (20)

Lab 3 Introduction to the UML - how to create a use case diagram
Lab 3 Introduction to the UML - how to create a use case diagramLab 3 Introduction to the UML - how to create a use case diagram
Lab 3 Introduction to the UML - how to create a use case diagram
 
Use Case Diagram.pptx
Use Case Diagram.pptxUse Case Diagram.pptx
Use Case Diagram.pptx
 
05 use case
05 use case05 use case
05 use case
 
Presentation Use Case Diagram and Use Case Specification.pptx
Presentation Use Case Diagram and Use Case Specification.pptxPresentation Use Case Diagram and Use Case Specification.pptx
Presentation Use Case Diagram and Use Case Specification.pptx
 
Lesson02_Use Case Diagrams
Lesson02_Use Case DiagramsLesson02_Use Case Diagrams
Lesson02_Use Case Diagrams
 
SE_RE-II-CH5 (3).pdf
SE_RE-II-CH5 (3).pdfSE_RE-II-CH5 (3).pdf
SE_RE-II-CH5 (3).pdf
 
Unified Modeling Language in Software Engineering
Unified Modeling Language in Software EngineeringUnified Modeling Language in Software Engineering
Unified Modeling Language in Software Engineering
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
 
[RPL2] Pertemuan 3 - UML dan USECASE VIEW
[RPL2] Pertemuan 3 - UML dan USECASE VIEW[RPL2] Pertemuan 3 - UML dan USECASE VIEW
[RPL2] Pertemuan 3 - UML dan USECASE VIEW
 
Use Case Modelling.pptx
Use Case Modelling.pptxUse Case Modelling.pptx
Use Case Modelling.pptx
 
Use Case Analysis and Diagramming
 Use Case Analysis and Diagramming Use Case Analysis and Diagramming
Use Case Analysis and Diagramming
 
Use case modeling
Use case modelingUse case modeling
Use case modeling
 
Lecture no 8 use case modeling and use case diagrams
Lecture no 8 use case modeling and use case diagramsLecture no 8 use case modeling and use case diagrams
Lecture no 8 use case modeling and use case diagrams
 
Lecture 3 cst205 cst281-oop
Lecture 3 cst205 cst281-oopLecture 3 cst205 cst281-oop
Lecture 3 cst205 cst281-oop
 
usecase (1).pptx
usecase (1).pptxusecase (1).pptx
usecase (1).pptx
 
Use Cases
Use CasesUse Cases
Use Cases
 
Use Cases
Use CasesUse Cases
Use Cases
 
Unit 3
Unit 3Unit 3
Unit 3
 
Use case diagrams
Use case diagramsUse case diagrams
Use case diagrams
 
Use case diagrams
Use case diagramsUse case diagrams
Use case diagrams
 

More from SandhyaTatekalva

Staffing
StaffingStaffing
San se unit
San se unitSan se unit
San se unit
SandhyaTatekalva
 
Os unit i
Os unit iOs unit i
Os unit i
SandhyaTatekalva
 
Os unit 3
Os unit 3Os unit 3
Os unit 3
SandhyaTatekalva
 
Marketing
MarketingMarketing
Marketing
SandhyaTatekalva
 
E r diagram
E r diagramE r diagram
E r diagram
SandhyaTatekalva
 
Em unit v
Em unit vEm unit v
Em unit v
SandhyaTatekalva
 
communication
communicationcommunication
communication
SandhyaTatekalva
 
software engineering
software engineeringsoftware engineering
software engineering
SandhyaTatekalva
 

More from SandhyaTatekalva (9)

Staffing
StaffingStaffing
Staffing
 
San se unit
San se unitSan se unit
San se unit
 
Os unit i
Os unit iOs unit i
Os unit i
 
Os unit 3
Os unit 3Os unit 3
Os unit 3
 
Marketing
MarketingMarketing
Marketing
 
E r diagram
E r diagramE r diagram
E r diagram
 
Em unit v
Em unit vEm unit v
Em unit v
 
communication
communicationcommunication
communication
 
software engineering
software engineeringsoftware engineering
software engineering
 

Recently uploaded

Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 

Recently uploaded (20)

Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 

Uml diagrams usecase

  • 2. Use case diagram Use case diagram is a behavioral UML diagram type and frequently used to analyze various systems. They enable us to visualize the different types of roles in a system and how those roles interact with the system.  Importance of Use Case Diagrams As mentioned before use case diagram are used to gather a usage requirement of a system. Depending on your requirement you can use that data in different ways. Below are few ways to use them. • To identify functions and how roles interact with them – The primary purpose of use case diagrams. • For a high level view of the system – Especially useful when presenting to managers or stakeholders. You can highlight the roles that interact with the system and the functionality provided by the system without going deep into inner workings of the system. • To identify internal and external factors – This might sound simple but in large complex projects a system can be identified as an external role in another use case.
  • 3. Use Case Diagram objects Use case diagrams consist of 4 objects. 1.Actor 2.Use case 3.System 4.Package • Actor Actor in a use case diagram is any entity that performs a role in one given system. This could be a person, organization or an external system. • Use Case A use case represents a function or an action within the system. Its drawn as an oval and named with the function.
  • 4. • System System is used to define the scope of the use case and drawn as a rectangle. Create all the use cases and then use the system object to define the scope covered by your project. Or we can even use it to show the different areas covered in different releases. • Package Package is another optional element that is extremely useful in complex diagrams. Similar to class diagrams, packages are used to group together use cases. They are drawn like the image shown below.
  • 5. Relationships in Use Case Diagrams • There are five types of relationships in a use case diagram. They are: 1. Association between an actor and a use case 2. Generalization of an actor 3. Extend relationship between two use cases 4. Include relationship between two use cases 5. Generalization of a use case
  • 6. Association Between Actor and Use Case • This one is straightforward and present in every use case diagram. • An actor must be associated with at least one use case. • An actor can be associated with multiple use cases. • Multiple actors can be associated with a single use case. Different ways association relationship appears in use case diagrams
  • 7. Generalization of an Actor • Generalization of an actor means that one actor can inherit the role of an other actor. The  descendant inherits all the use cases of the ancestor. The descendant have one or more use cases that are specific to that role. A generalized actor in an use case diagram
  • 8. Extend Relationship Between Two Use Cases • As the name implies it extends the base use case and adds more functionality to the system. Here are few things to consider when using the <<extend>> relationship. • The extending use case is dependent on the extended (base) use case. In the below diagram the “Calculate Bonus” use case doesn’t make much sense without the “Deposit Funds” use case. • The extending use case is usually optional and can be triggered conditionally. In the diagram you can see that the extending use case is triggered only for deposits over 10,000 or when the age is over 55. • The extended (base) use case must be meaningful on its own. This means it should be independent and must not rely on the behavior of the extending use case.
  • 9. Extend relationship in use case diagrams
  • 10. Include Relationship Between Two Use Cases • Include relationship show that the behavior of the included use case is part of the including (base) use case. The main reason for this is to reuse the common actions across multiple use cases. Few things to consider when using the <<include>> relationship. • The base use case is incomplete without the included use case. • The included use case is mandatory and not optional. • Lest expand our banking system use case diagram to show include relationships as well.
  • 11. Includes is usually used to model common behavior
  • 12. Generalization of a Use Case • This is similar to the generalization of an actor. The behavior of the ancestor is inherited by the descendant. This is used when there are common behavior between two use cases and also specialized behavior specific to each use case. • For example in the previous banking example there might be an use case called “Pay Bills”. This can be generalized to “Pay by Credit Card”, “Pay by Bank Balance” etc.
  • 13. How to Create a Use Case Diagram Identifying Actors • Actors are external entities that interact with your system. It can be a person, another system or an organization. In a banking system the most obvious actor is the customer. Other actors can be bank employee or cashier depending on the role we are trying to show in the use case. • An example of an external organization can be the tax authority or the central bank. Loan processor is a good example of external system associated as an actor. Identifying Use Cases • Now it’s time to identify the use cases. A good way to do this is to identify what the actors needs from the system. In a banking system a customer will need to open accounts, deposit and withdraw funds, request check books and similar functions. So all of these can be considered as use cases. • Top level use cases should always provide a complete functions required by an actor. You can extend or include use cases depending on the complexity of the system.
  • 14. How to Create a Use Case Diagram (cont..) • Look for Common Functionality to use Include Look for common functionality that can be reused across the system. If you find two or more use cases that share common functionality you can extract the common functions and add it to a separate use case. Then you can connect it via the include relationship to show that its always called when the original use case is executed. • Is it Possible to Generalize Actors and Use Cases There maybe instances where actors are associated with similar use cases while triggering few use cases unique only to them. In such instances you can generalize the actor to show the inheritance of functions. You can do a similar thing for use case as well. • Optional Functions or Additional Functions There are some functions that are triggered optionally. In such cases you can use the extend relationship and attach and extension rule to it. In the below banking system example “Calculate Bonus” is optional and only triggers when a certain condition is matched.