SlideShare a Scribd company logo
UML Diagrams- Use CaseUML Diagrams- Use Case
Preeti Mishra
Course Incharge
Course will cover..
• What is a use-case
– Use-case versus user interaction
• Use-Case diagrams
– The constructs in the use-case diagrams
• Capturing the use-case
– High-level use-case
– Extended use-case
– Difference between use case and scenario
What is a Use Case
– A use-case captures some user visible function
–  simplest is a representation of a user's interaction with the system
and depicting the specifications of a use case.
– A use case diagram can portray the different types of users of a
system and the various ways that they interact with the system
–  help provide a higher-level view of the system.
An Example
• Consider the following when formatting a document
• Define a style
• Change a style
• Copy a style from one document to the next
– versus
• Format a document
• Ensure consistent formatting of two documents
• The latter is a user goal
– Something the user wants to achieve
• The former are user interactions
– Things the user does to the system to achieve the goal
5 05-Use-Cases
Goals and Interactions
• There is a place for both goals and interactions
• Understand what the system shall do
– Capture the user goals
• Understand how the user will achieve the goals
– Capture user interactions
– Sequences of user interactions
• Thus, start with the user goals and then refine the
user goals into several (many) user interactions
6
Actors
– An actor represents a set of roles that users
of use case play when interacting with these
use cases.
– Actors can be human or automated systems.
– Actors are entities which require help from
the system to perform their task or are
needed to execute the system’s functions.
– Actors are not part of the system.
name
7
Use Cases and Actors
– From the perspective of a given actor, a use case
does something that is of value to the actor,
such as calculate a result or change the state of
an object.
– The Actors define the environments in which the
system lives
Work
Use case Diagram
Use case Diagram
10
Relationships between
Use Cases
– Generalization - use cases that are specialized
versions of other use cases.
– Include - use cases that are included as parts of
other use cases. Enable to factor common
behavior.
– Extend - use cases that extend the behavior of
other core use cases. Enable to factor variants.
11
Generalization
– The child use case inherits the
behavior and meaning of the
parent use case.
– The child may add to or
override the behavior of its parent.
parent
child
12
registration
graduate
registration
non-graduate
registration
More about
Generalization
13
Include
– The base use case explicitly
incorporates the behavior of another
use case at a location specified in the
base.
– The included use case never stands
alone. It only occurs as a part of some
larger base that includes it.
base included<<include>>
14
More about Include
– Enables to avoid describing the same
flow of events several times by putting
the common behavior in a use case of its
own.
updating
grades
output
generating
verifying
student id
<<include>>
<<include>>
15
Extend
• The base use case implicitly
incorporates the behavior of another
use case at certain points called
extension points.
• The base use case may stand alone,
but under certain conditions its
behavior may be extended by the
behavior of another use case.
base extending<<extend>>
16
More about Extend
• Enables to model optional behavior or
branching under conditions.
Exam copy
request
Exam-grade
appeal
<<extend>>
17
Relationships between
Actors
• Generalization.
student
non-graduate
student
graduate
student
18
Relationships between Use Cases
and Actors
– Actors may be connected to use cases
by associations, indicating that the
actor and the use case communicate
with one another using messages.
updating
grades
faculty
19
Example
place
phone call
cellular
network
user
receive
phone call
place
conference
call
receive
additional
call
use
scheduler
<<extend>>
<<extend>>
Cellular Telephone
20
Update Items
Bookshop
Worker
Ship Order
Bookshop
Manager
Update Staff Details
Register Details
Customer
1
System Login
Update Customer Details
Add Items to ShoppingCart
Handle Order
<<include>>
<<extend>>
<<include>>
Make Order
<<include>>
A More Complicate Example
21
Each use case may include all or part of:
 Title or Reference Name - meaningful name of the UC
 Author/Date - the author and creation date
 Modification/Date - last modification and its date
 Purpose - specifies the goal to be achieved
 Overview - short description of the processes
 Cross References - requirements references
 Actors - agents participating
 Pre Conditions - must be true to allow execution
 Post Conditions - will be set when completes normally
 Normal flow of events - regular flow of activities
 Alternative flow of events - other flow of activities
 Exceptional flow of events - unusual situations
 Implementation issues - foreseen implementation problems
Use Case Description
22
Example- Money Withdraw
(cont.)
• Actors: Customer
• Pre Condition:
– The ATM must be in a state ready to accept
transactions
– The ATM must have at least some cash on hand that it
can dispense
– The ATM must have enough paper to print a receipt for
at least one transaction
• Post Condition:
– The current amount of cash in the user account is the
amount before the withdraw minus the withdraw amount
– A receipt was printed on the withdraw amount
– The withdraw transaction was audit in the System log
file
23
Example- Money Withdraw
(cont.)
 Typical Course of events:
Actor ActionsActor Actions System ActionsSystem Actions
1. Begins when a Customer arrives at ATM1. Begins when a Customer arrives at ATM
2. Customer inserts a Credit card into ATM2. Customer inserts a Credit card into ATM 3. System verifies the customer ID and status3. System verifies the customer ID and status
5. Customer chooses “Withdraw” operation5. Customer chooses “Withdraw” operation 4. System asks for an operation type4. System asks for an operation type
7. Customer enters the cash amount7. Customer enters the cash amount 6. System asks for the withdraw amount6. System asks for the withdraw amount
8. System checks if withdraw amount is legal8. System checks if withdraw amount is legal
9. System dispenses the cash9. System dispenses the cash
10. System deduces the withdraw amount from10. System deduces the withdraw amount from
accountaccount
11. System prints a receipt11. System prints a receipt
13. Customer takes the cash and the receipt13. Customer takes the cash and the receipt 12. System ejects the cash card12. System ejects the cash card
24
Example- Money Withdraw
(cont.)
• Alternative flow of events:
– Step 3: Customer authorization failed. Display
an error message, cancel the transaction and
eject the card.
– Step 8: Customer has insufficient funds in its
account. Display an error message, and go to
step 6.
– Step 8: Customer exceeds its legal amount.
Display an error message, and go to step 6.
• Exceptional flow of events:
– Power failure in the process of the transaction
before step 9, cancel the transaction and eject
the card
25
Example- Money Withdraw
(cont.)
 One method to identify use cases is actor-based:
- Identify the actors related to a system or organization.
- For each actor, identify the processes they initiate or participate in.
 A second method to identify use cases is event-based:
- Identify the external events that a system must respond to.
- Relate the events to actors and use cases.
 The following questions may be used to help identify the use
cases for a system:
- What are tasks of each actor ?
- Will any actor create, store, change, remove, or read information in
the system ?
- What use cases will create, store, change, remove, or read this
information ?
- Will any actor need to inform the system about sudden, external
changes ?
- Does any actor need to be informed about certain occurrences in the
system ?
- Can all functional requirements be performed by the use cases ?
Use case Diagram

More Related Content

PPT
Uml Activity Diagram
PDF
Use case diagrams
PPTX
UML and Software Modeling Tools.pptx
PPT
Lecture04- Use Case Diagrams
PPTX
Diagrams
PPT
Use case-diagrams
PPT
UML diagrams and symbols
PPT
Lecture11 use case sequence diagram
Uml Activity Diagram
Use case diagrams
UML and Software Modeling Tools.pptx
Lecture04- Use Case Diagrams
Diagrams
Use case-diagrams
UML diagrams and symbols
Lecture11 use case sequence diagram

What's hot (20)

PPT
Use case Diagram
PPTX
Use case diagram
PDF
Domain Modeling
PDF
State chart diagram
PDF
Activity diagram-UML diagram
PPT
Use Case Diagram
PDF
PPTX
Activity diagram
PPT
Uml diagrams
PPT
Analysis modeling in software engineering
DOC
Case Study Uml
PDF
Sequence diagram- UML diagram
PPTX
Presentation on uml
PPTX
Design Concepts in Software Engineering-1.pptx
PDF
SE_Lec 09_ UML Behaviour Diagrams
PPTX
object oriented methodologies
PPT
Use case Diagram and Sequence Diagram
PPT
Unit 3(advanced state modeling & interaction meodelling)
PPTX
Activity diagram model
Use case Diagram
Use case diagram
Domain Modeling
State chart diagram
Activity diagram-UML diagram
Use Case Diagram
Activity diagram
Uml diagrams
Analysis modeling in software engineering
Case Study Uml
Sequence diagram- UML diagram
Presentation on uml
Design Concepts in Software Engineering-1.pptx
SE_Lec 09_ UML Behaviour Diagrams
object oriented methodologies
Use case Diagram and Sequence Diagram
Unit 3(advanced state modeling & interaction meodelling)
Activity diagram model
Ad

Similar to Use case Diagram (20)

PDF
6-UseCfgfhgfhgfhgfhgfhfhhaseActivity.pdf
PPTX
Final use case (1)
PDF
SE_Lec 08_UML Use Cases
PDF
SE18_Lec 09_UML Use Cases
PPT
PPTX
StructureofUseCases.pptx
PDF
Use Case diagram-UML diagram-1
PPT
Use cases
PDF
2.1 usecase diagram
PPTX
USE case diagrams.ppt.pptx..............
PPT
chapter_5_5.ppt
PPTX
Lesson02_Use Case Diagrams
PPTX
Lecture#04, use case diagram
PPTX
Lecture no 8 use case modeling and use case diagrams
PPT
06 RE_use case diagm1.ppt
PPTX
SE Software Requirements Engineering .pptx
PPT
StructureofUseCases.ppt
PPTX
use_case+use_case description.pptx
PPT
Use Case Model with components in software.ppt
PPTX
Presentation Use Case Diagram and Use Case Specification.pptx
6-UseCfgfhgfhgfhgfhgfhfhhaseActivity.pdf
Final use case (1)
SE_Lec 08_UML Use Cases
SE18_Lec 09_UML Use Cases
StructureofUseCases.pptx
Use Case diagram-UML diagram-1
Use cases
2.1 usecase diagram
USE case diagrams.ppt.pptx..............
chapter_5_5.ppt
Lesson02_Use Case Diagrams
Lecture#04, use case diagram
Lecture no 8 use case modeling and use case diagrams
06 RE_use case diagm1.ppt
SE Software Requirements Engineering .pptx
StructureofUseCases.ppt
use_case+use_case description.pptx
Use Case Model with components in software.ppt
Presentation Use Case Diagram and Use Case Specification.pptx
Ad

More from Preeti Mishra (20)

PDF
Effective Ways to Conduct Programming labs
PDF
Uml intro
PDF
Component diagram
PDF
Activity diag
PDF
Object diagram
PDF
Sequence diagrams
PPTX
Unit 8 software quality and matrices
PPTX
Unit 5 design engineering ssad
PPT
architectural design
PPTX
Oo concepts and class modeling
PPTX
Unit 7 performing user interface design
PPT
testing strategies and tactics
PPT
requirements analysis and design
PPTX
Design process interaction design basics
PPTX
Design process design rules
PPTX
Design process evaluating interactive_designs
PPTX
Foundations understanding users and interactions
PPTX
IntrIntroduction
PPT
Coupling coheshion tps
PPTX
Analysis
Effective Ways to Conduct Programming labs
Uml intro
Component diagram
Activity diag
Object diagram
Sequence diagrams
Unit 8 software quality and matrices
Unit 5 design engineering ssad
architectural design
Oo concepts and class modeling
Unit 7 performing user interface design
testing strategies and tactics
requirements analysis and design
Design process interaction design basics
Design process design rules
Design process evaluating interactive_designs
Foundations understanding users and interactions
IntrIntroduction
Coupling coheshion tps
Analysis

Recently uploaded (20)

PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
Structs to JSON How Go Powers REST APIs.pdf
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPT
Project quality management in manufacturing
PDF
composite construction of structures.pdf
PDF
Digital Logic Computer Design lecture notes
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
Welding lecture in detail for understanding
PPTX
additive manufacturing of ss316l using mig welding
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Structs to JSON How Go Powers REST APIs.pdf
Foundation to blockchain - A guide to Blockchain Tech
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Internet of Things (IOT) - A guide to understanding
Strings in CPP - Strings in C++ are sequences of characters used to store and...
CH1 Production IntroductoryConcepts.pptx
Operating System & Kernel Study Guide-1 - converted.pdf
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Model Code of Practice - Construction Work - 21102022 .pdf
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Project quality management in manufacturing
composite construction of structures.pdf
Digital Logic Computer Design lecture notes
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Welding lecture in detail for understanding
additive manufacturing of ss316l using mig welding
Arduino robotics embedded978-1-4302-3184-4.pdf

Use case Diagram

  • 1. UML Diagrams- Use CaseUML Diagrams- Use Case Preeti Mishra Course Incharge
  • 2. Course will cover.. • What is a use-case – Use-case versus user interaction • Use-Case diagrams – The constructs in the use-case diagrams • Capturing the use-case – High-level use-case – Extended use-case – Difference between use case and scenario
  • 3. What is a Use Case – A use-case captures some user visible function –  simplest is a representation of a user's interaction with the system and depicting the specifications of a use case. – A use case diagram can portray the different types of users of a system and the various ways that they interact with the system –  help provide a higher-level view of the system.
  • 4. An Example • Consider the following when formatting a document • Define a style • Change a style • Copy a style from one document to the next – versus • Format a document • Ensure consistent formatting of two documents • The latter is a user goal – Something the user wants to achieve • The former are user interactions – Things the user does to the system to achieve the goal
  • 5. 5 05-Use-Cases Goals and Interactions • There is a place for both goals and interactions • Understand what the system shall do – Capture the user goals • Understand how the user will achieve the goals – Capture user interactions – Sequences of user interactions • Thus, start with the user goals and then refine the user goals into several (many) user interactions
  • 6. 6 Actors – An actor represents a set of roles that users of use case play when interacting with these use cases. – Actors can be human or automated systems. – Actors are entities which require help from the system to perform their task or are needed to execute the system’s functions. – Actors are not part of the system. name
  • 7. 7 Use Cases and Actors – From the perspective of a given actor, a use case does something that is of value to the actor, such as calculate a result or change the state of an object. – The Actors define the environments in which the system lives Work
  • 10. 10 Relationships between Use Cases – Generalization - use cases that are specialized versions of other use cases. – Include - use cases that are included as parts of other use cases. Enable to factor common behavior. – Extend - use cases that extend the behavior of other core use cases. Enable to factor variants.
  • 11. 11 Generalization – The child use case inherits the behavior and meaning of the parent use case. – The child may add to or override the behavior of its parent. parent child
  • 13. 13 Include – The base use case explicitly incorporates the behavior of another use case at a location specified in the base. – The included use case never stands alone. It only occurs as a part of some larger base that includes it. base included<<include>>
  • 14. 14 More about Include – Enables to avoid describing the same flow of events several times by putting the common behavior in a use case of its own. updating grades output generating verifying student id <<include>> <<include>>
  • 15. 15 Extend • The base use case implicitly incorporates the behavior of another use case at certain points called extension points. • The base use case may stand alone, but under certain conditions its behavior may be extended by the behavior of another use case. base extending<<extend>>
  • 16. 16 More about Extend • Enables to model optional behavior or branching under conditions. Exam copy request Exam-grade appeal <<extend>>
  • 18. 18 Relationships between Use Cases and Actors – Actors may be connected to use cases by associations, indicating that the actor and the use case communicate with one another using messages. updating grades faculty
  • 20. 20 Update Items Bookshop Worker Ship Order Bookshop Manager Update Staff Details Register Details Customer 1 System Login Update Customer Details Add Items to ShoppingCart Handle Order <<include>> <<extend>> <<include>> Make Order <<include>> A More Complicate Example
  • 21. 21 Each use case may include all or part of:  Title or Reference Name - meaningful name of the UC  Author/Date - the author and creation date  Modification/Date - last modification and its date  Purpose - specifies the goal to be achieved  Overview - short description of the processes  Cross References - requirements references  Actors - agents participating  Pre Conditions - must be true to allow execution  Post Conditions - will be set when completes normally  Normal flow of events - regular flow of activities  Alternative flow of events - other flow of activities  Exceptional flow of events - unusual situations  Implementation issues - foreseen implementation problems Use Case Description
  • 22. 22 Example- Money Withdraw (cont.) • Actors: Customer • Pre Condition: – The ATM must be in a state ready to accept transactions – The ATM must have at least some cash on hand that it can dispense – The ATM must have enough paper to print a receipt for at least one transaction • Post Condition: – The current amount of cash in the user account is the amount before the withdraw minus the withdraw amount – A receipt was printed on the withdraw amount – The withdraw transaction was audit in the System log file
  • 23. 23 Example- Money Withdraw (cont.)  Typical Course of events: Actor ActionsActor Actions System ActionsSystem Actions 1. Begins when a Customer arrives at ATM1. Begins when a Customer arrives at ATM 2. Customer inserts a Credit card into ATM2. Customer inserts a Credit card into ATM 3. System verifies the customer ID and status3. System verifies the customer ID and status 5. Customer chooses “Withdraw” operation5. Customer chooses “Withdraw” operation 4. System asks for an operation type4. System asks for an operation type 7. Customer enters the cash amount7. Customer enters the cash amount 6. System asks for the withdraw amount6. System asks for the withdraw amount 8. System checks if withdraw amount is legal8. System checks if withdraw amount is legal 9. System dispenses the cash9. System dispenses the cash 10. System deduces the withdraw amount from10. System deduces the withdraw amount from accountaccount 11. System prints a receipt11. System prints a receipt 13. Customer takes the cash and the receipt13. Customer takes the cash and the receipt 12. System ejects the cash card12. System ejects the cash card
  • 24. 24 Example- Money Withdraw (cont.) • Alternative flow of events: – Step 3: Customer authorization failed. Display an error message, cancel the transaction and eject the card. – Step 8: Customer has insufficient funds in its account. Display an error message, and go to step 6. – Step 8: Customer exceeds its legal amount. Display an error message, and go to step 6. • Exceptional flow of events: – Power failure in the process of the transaction before step 9, cancel the transaction and eject the card
  • 25. 25 Example- Money Withdraw (cont.)  One method to identify use cases is actor-based: - Identify the actors related to a system or organization. - For each actor, identify the processes they initiate or participate in.  A second method to identify use cases is event-based: - Identify the external events that a system must respond to. - Relate the events to actors and use cases.  The following questions may be used to help identify the use cases for a system: - What are tasks of each actor ? - Will any actor create, store, change, remove, or read information in the system ? - What use cases will create, store, change, remove, or read this information ? - Will any actor need to inform the system about sudden, external changes ? - Does any actor need to be informed about certain occurrences in the system ? - Can all functional requirements be performed by the use cases ?