SlideShare una empresa de Scribd logo
1 de 15
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

Más contenido relacionado

La actualidad más candente

Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML DiagramsManish Kumar
 
Darshan sem4 140703_ooad_2014 (diagrams)
Darshan sem4 140703_ooad_2014 (diagrams)Darshan sem4 140703_ooad_2014 (diagrams)
Darshan sem4 140703_ooad_2014 (diagrams)Gajeshwar Bahekar
 
The Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialThe Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialCreately
 
Activity Diagram
Activity DiagramActivity Diagram
Activity DiagramAshesh R
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral ModelingAMITJain879
 
Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and designjayashri kolekar
 
UML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionUML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionCherryBerry2
 
INTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSINTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSAshita Agrawal
 
Introduction to fragments in android
Introduction to fragments in androidIntroduction to fragments in android
Introduction to fragments in androidPrawesh Shrestha
 
Use case diagrams 2014
Use case diagrams 2014Use case diagrams 2014
Use case diagrams 2014Inge Powell
 
Component Diagram Example Templates
Component Diagram Example TemplatesComponent Diagram Example Templates
Component Diagram Example TemplatesCreately
 
Communication diagram Introduction
Communication diagram IntroductionCommunication diagram Introduction
Communication diagram IntroductionDineesha Suraweera
 
UML- Unified Modeling Language
UML- Unified Modeling LanguageUML- Unified Modeling Language
UML- Unified Modeling LanguageShahzad
 
Sequence diagram- UML diagram
Sequence diagram- UML diagramSequence diagram- UML diagram
Sequence diagram- UML diagramRamakant Soni
 

La actualidad más candente (20)

Use case modeling
Use case modelingUse case modeling
Use case modeling
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
 
Diagrams
DiagramsDiagrams
Diagrams
 
Darshan sem4 140703_ooad_2014 (diagrams)
Darshan sem4 140703_ooad_2014 (diagrams)Darshan sem4 140703_ooad_2014 (diagrams)
Darshan sem4 140703_ooad_2014 (diagrams)
 
The Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialThe Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram Tutorial
 
Activity Diagram
Activity DiagramActivity Diagram
Activity Diagram
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
 
Uml class-diagram
Uml class-diagramUml class-diagram
Uml class-diagram
 
Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and design
 
Uml class Diagram
Uml class DiagramUml class Diagram
Uml class Diagram
 
Introducción a UML
Introducción a UMLIntroducción a UML
Introducción a UML
 
UML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionUML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussion
 
INTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSINTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMS
 
Introduction to fragments in android
Introduction to fragments in androidIntroduction to fragments in android
Introduction to fragments in android
 
Use case diagrams 2014
Use case diagrams 2014Use case diagrams 2014
Use case diagrams 2014
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
 
Component Diagram Example Templates
Component Diagram Example TemplatesComponent Diagram Example Templates
Component Diagram Example Templates
 
Communication diagram Introduction
Communication diagram IntroductionCommunication diagram Introduction
Communication diagram Introduction
 
UML- Unified Modeling Language
UML- Unified Modeling LanguageUML- Unified Modeling Language
UML- Unified Modeling Language
 
Sequence diagram- UML diagram
Sequence diagram- UML diagramSequence diagram- UML diagram
Sequence diagram- UML diagram
 

Similar a 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 diagramFarah Ahmed
 
Use Case Diagram.pptx
Use Case Diagram.pptxUse Case Diagram.pptx
Use Case Diagram.pptxGenta Sahuri
 
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.pptxazida3
 
Lesson02_Use Case Diagrams
Lesson02_Use Case DiagramsLesson02_Use Case Diagrams
Lesson02_Use Case DiagramsMarwa Ali Eissa
 
SE_RE-II-CH5 (3).pdf
SE_RE-II-CH5 (3).pdfSE_RE-II-CH5 (3).pdf
SE_RE-II-CH5 (3).pdfAZKANAAZ1
 
[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 VIEWrizki adam kurniawan
 
Use Case Modelling.pptx
Use Case Modelling.pptxUse Case Modelling.pptx
Use Case Modelling.pptxazida3
 
Use Case Analysis and Diagramming
 Use Case Analysis and Diagramming Use Case Analysis and Diagramming
Use Case Analysis and DiagrammingOrnella Dunn
 
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 diagramsnaveed428
 
Lecture 3 cst205 cst281-oop
Lecture 3 cst205 cst281-oopLecture 3 cst205 cst281-oop
Lecture 3 cst205 cst281-oopktuonlinenotes
 
usecase (1).pptx
usecase (1).pptxusecase (1).pptx
usecase (1).pptxNadir438180
 
Ppt ooad ooad3unit
Ppt ooad ooad3unitPpt ooad ooad3unit
Ppt ooad ooad3unitramyalaksha
 

Similar a 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
 
Use case diagram
Use case diagramUse case diagram
Use case diagram
 
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
 
[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
 
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
 
Ppt ooad ooad3unit
Ppt ooad ooad3unitPpt ooad ooad3unit
Ppt ooad ooad3unit
 
Usecase
UsecaseUsecase
Usecase
 

Más de 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
 

Último

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 

Último (20)

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 

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.