SlideShare ist ein Scribd-Unternehmen logo
1 von 24
+
Use Case Diagrams
Systems Analysis and Design
Michael Heron
+
Introduction
 We’ve spent a lot of time looking at class diagrams over the
past few weeks.
 This week we’re going to introduce a new diagraming notation.
 Class diagrams represent a static view of the system.
 They’re about the architecture of the system, how the code relates.
 Today we’re going to talk about use case diagrams.
 The first of our dynamic views of the system.
 Use diagrams cover all the ways in which an individual may
interest with our system.
+
Use Case Diagrams
 Use case diagrams give a very high level overview of abstract
interactions with a system.
 We don’t care about how, we only care about what.
 They allow us to have many different views of a system.
 We may want a view for a normal user, a super user, a privileged
user and so on.
 Use-case diagrams are made up of four elements.
 Actors
 The System Itself
 Use-Cases
 Relationships between Use Cases
+
A simple example
+
Use-Case Diagrams
 Honestly, that’s how they look.
 Honest.
 The stick figure is the actor.
 An individual or group of individuals who may interact with our system.
 The box is the system.
 In this case, a light switch.
 The use cases are the circles.
 Switch on and switch off.
 The lines are the relationships.
 A person has access to the switch on and switch off use cases.
+
Use Cases
 You will see that there’s no relationship between individual use
cases.
 We don’t need to worry about how they work or what use cases they
influence.
 The diagram doesn’t show that before they are switched off they
must be switched on.
 We’ll handle that later.
 Use cases represent each of the distinct activities that an actor
may perform within our system.
 They tell us then what functionality we will need to expose to a user
in order for them to meet the system requirements.
 This relates to visibility as discussed earlier in the module.
+
Actors
 Actors need not be real people.
 They can also be other computer systems.
 Most actors are external entities.
 We have no control over them or what they may choose to do.
 All we have control over is what functionality our system will expose
to them.
 However, we may sometimes use use-case diagrams to show
relationship between internal subsystems.
 In this case we may have more control over how the system works,
but we still represent them as external entities.
+
Another Example
+
Another Example
 The use case diagram doesn’t represent causality.
 It doesn’t show in what order things must be done.
 It shows the set of actions that an actor can perform.
 A file server can’t request a page.
 A web surfer can’t send a page.
 We can also provide multiple use case diagrams for different
actors.
 In fact, we will almost certainly do this.
 But wait, there’s more…
+
A Third Example
+
A Third Example
 This diagram shows a subdivision of use cases.
 Flash, Press Button and Release Button are separate activities.
 The Take Picture use case will make use of each of these
 All use-cases will be used at least once during the course of the use-
case execution.
 Not necessarily true in our example.
 In this way we can show an association between individual use
case elements.
 This allows us to minimise the complexity of our diagram.
 Limit the number of abstract actions an actor can perform.
 It also allows us to reuse elements.
 Important when it comes to documentation of use cases.
+
Representing Inheritance
+
Representing Inheritance
 Use Case Diagrams are part of the UML standard, and thus are
Object Oriented diagrams.
 So we need to be able to show inheritance.
 For the majority of diagrams you develop, these probably will
not be necessary.
 Use case diagrams are most effective when they show abstract
interaction.
 But you have the uses and extends relationships if you need to
represent something more complex or you need to cut down in
documentation duplication.
+
Documenting Use Cases
 The diagrams are only one aspect of a use case.
 The next aspect is a use case description.
 This is a meaty outline (sometimes on separate cards) of what
each of the activities actually mean.
 They will include as part of their design a series of scenarios.
 Usually provided in pseudocode.
 The scenarios will cover the steps taken to carry out the use-
case.
 Separate scenarios for exceptional conditions will also be provided.
+
Use Case Documentation
 General comments and notes
 Requirements: what it allows the actor to accomplish.
 Constraints: Rules about what can and cannot be done with the use-case.
These can be broken down into:
 Pre-conditions
 Post-conditions
 Invariants
 Scenarios that detail the steps that must be taken to carry out the use-case.
May include a number of scenarios to show exceptional conditions.
 Scenario diagrams that depict the processing - we haven’t covered these yet
but we will in weeks to come.
 Additional attributes such as a change log, version number, complexity rating,
and so on.
+
Example
Use Case: Deal Hand
Requirements: Is used to ensure every player in a game of poker has five cards in their hand.
Pre-Conditions: The deck has 52 cards
Post-Conditions: All poker players have five cards
Invariants: The sum of the number of cards in each players hand and in the remaining deck is 52.
Scenarios:
Normal flow of events:
Let numPlayers be equal to the number of players
repeat five times
repeat a number of times equal to numPlayers
Dealer removes card from top of deck
Dealer deals card face-down to player
Dealer moves clockwise to next player
Player Sits Out Hand
Let numPlayers be equal to the number of players minus one
repeat five times
repeat a number of times equal to numPlayers
if current player is sitting out hand
move onto next player
Dealer removes card from top of deck
Dealer deals card face-down to player
Dealer moves clockwise to next player
Scenario Diagrams: To follow
Additonal Attributes: None as of yet
+
Use-Case Documentation
 There is no need for scenarios to be 100% complete the first
time.
 As part of the additional attributes, we may include a formal change
log.
 However, identifying what each use-case is supposed to do
helps in identifying:
 Scope
 Completeness
 Overlap
 Ambiguity
 They can direct you to answer the right kinds of questions.
+
Identifying Use-Cases
 As with classes, identifying use cases is part of the challenge.
 For this we use a system called event decomposition.
 This allows us to identify the events to which a system must
respond and then working out how it actually responds.
 We concentrate on external stimuli for this.
 We treat our system as a black box.
 We don’t know what’s going on inside it.
 We just know there are ‘buttons we should be able to press’
 We can do this through various ways.
 Roleplaying, for example.
+
Event Decomposition
 We look at three categories of events from the perspective of
each actor.
 External events – ones initiated by an external entity.
 ‘I come along and press a button’
 For this, we need to identify the set of all the actors in our system.
 Who are we writing this for?
 We list the entities, and then outline what we think the full set of
actions they would perform might be.
 Trying to identify the external entities in a piece of online retail
software may introduce customers, administrators, and external web
pages.
+
External Events
Entity Transactions
Customer Buy Book
View shopping basket
Make Payment
Browse catalogue
Query book details
Query Account
Web-Page Query Query book details
Browse catalogue
Administrator Buy Book
View Shopping Basket
Make Payment
Browse Catalogue
Query Book Details
Update Book Details
Update Customer Details
Add Catalogue Entry
Remove Catalogue Entry
+
Temporal Events
 Temporal events are those that occur as a result of reaching a
particular point in time.
 End of the day
 End of the week
 End of the month
 Most systems will do some kind of ‘batch processing’ at this
point.
 For simplicity of logistics.
 We list, in a similar style to the external events, all of the time-
related events we wish to capture.
+
State Events
 State events are those that occur when the internal data of a
system are altered to the point that system processing is
required.
 If the stock of an item drops below a number, order more stock.
 Or send a message to procurement.
 Usually these kind of state events occur as a consequence of
other events.
 A customer buys an item.
 This triggers the state event.
 They still need to be documented separately.
+
Identifying Events
 As with objects and classes, identifying events is an intellectual
activity.
 This is a technique, not a guaranteed algorithm.
 You still need to decide what makes sense and at what level of
detail.
 What constitutes a single event?
 There’s no hard and fast rule.
 One useful technique is to consider it based on atomicity.
 If any significant time passes between one event and another, it’s
two separate events.
+
Conclusion
 Use case diagrams are part of the dynamic view of a system.
 They gives us an overview of what interfaces our precious code
must expose.
 They come in the form of simple stick figures and boxes.
 And lines.
 They can represent both association and inheritance.
 But we don’t worry too much about those until we need them.
 Identifying events is hard.
 And will only become easier with experience.
 Event decomposition can help with this.

Weitere ähnliche Inhalte

Was ist angesagt?

Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramNikhil Pandit
 
Css ppt - Cascading Style Sheets
Css ppt - Cascading Style SheetsCss ppt - Cascading Style Sheets
Css ppt - Cascading Style SheetsShaheen Shaikh
 
Online ecommerce website srs
Online ecommerce  website srsOnline ecommerce  website srs
Online ecommerce website srsSM Nurnobi
 
Error handling and debugging in vb
Error handling and debugging in vbError handling and debugging in vb
Error handling and debugging in vbSalim M
 
Activity diagram-UML diagram
Activity diagram-UML diagramActivity diagram-UML diagram
Activity diagram-UML diagramRamakant Soni
 
Library Management System
Library Management SystemLibrary Management System
Library Management SystemAnit Thapaliya
 
UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...
UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...
UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...Niloy Biswas
 
Database management system Lecture 7 : Strong and weak entity sets
Database management system Lecture 7 : Strong and weak entity setsDatabase management system Lecture 7 : Strong and weak entity sets
Database management system Lecture 7 : Strong and weak entity setsBIT Durg
 
Library management system
Library management systemLibrary management system
Library management systemashu6
 
Structured Vs, Object Oriented Analysis and Design
Structured Vs, Object Oriented Analysis and DesignStructured Vs, Object Oriented Analysis and Design
Structured Vs, Object Oriented Analysis and DesignMotaz Saad
 
SE_Lec 07_UML CLASS DIAGRAM
SE_Lec 07_UML CLASS DIAGRAMSE_Lec 07_UML CLASS DIAGRAM
SE_Lec 07_UML CLASS DIAGRAMAmr E. Mohamed
 

Was ist angesagt? (20)

Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence Diagram
 
Use Case UML Diagram
Use Case UML DiagramUse Case UML Diagram
Use Case UML Diagram
 
Css ppt - Cascading Style Sheets
Css ppt - Cascading Style SheetsCss ppt - Cascading Style Sheets
Css ppt - Cascading Style Sheets
 
Online ecommerce website srs
Online ecommerce  website srsOnline ecommerce  website srs
Online ecommerce website srs
 
Error handling and debugging in vb
Error handling and debugging in vbError handling and debugging in vb
Error handling and debugging in vb
 
Activity diagram-UML diagram
Activity diagram-UML diagramActivity diagram-UML diagram
Activity diagram-UML diagram
 
Srs present
Srs presentSrs present
Srs present
 
State chart diagram
State chart diagramState chart diagram
State chart diagram
 
Library Management System
Library Management SystemLibrary Management System
Library Management System
 
UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...
UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...
UML Diagram - Use-Case diagram, Activity Diagram, Sequence Diagram, Er Diagra...
 
Database management system Lecture 7 : Strong and weak entity sets
Database management system Lecture 7 : Strong and weak entity setsDatabase management system Lecture 7 : Strong and weak entity sets
Database management system Lecture 7 : Strong and weak entity sets
 
Symmetric and asymmetric key
Symmetric and asymmetric keySymmetric and asymmetric key
Symmetric and asymmetric key
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
Library management system
Library management systemLibrary management system
Library management system
 
Structured Vs, Object Oriented Analysis and Design
Structured Vs, Object Oriented Analysis and DesignStructured Vs, Object Oriented Analysis and Design
Structured Vs, Object Oriented Analysis and Design
 
Fundamentasl of DFD
Fundamentasl of DFDFundamentasl of DFD
Fundamentasl of DFD
 
Activity diagrams
Activity diagramsActivity diagrams
Activity diagrams
 
SE_Lec 07_UML CLASS DIAGRAM
SE_Lec 07_UML CLASS DIAGRAMSE_Lec 07_UML CLASS DIAGRAM
SE_Lec 07_UML CLASS DIAGRAM
 
Software requirement specification(SRS)
Software requirement specification(SRS)Software requirement specification(SRS)
Software requirement specification(SRS)
 
Uml sequence diagrams
Uml sequence diagramsUml sequence diagrams
Uml sequence diagrams
 

Ähnlich wie SAD06 - Use Case Diagrams

Ähnlich wie SAD06 - Use Case Diagrams (20)

Lecture#04, use case diagram
Lecture#04, use case diagramLecture#04, use case diagram
Lecture#04, use case diagram
 
SAD09 - Activity Diagrams
SAD09 - Activity DiagramsSAD09 - Activity Diagrams
SAD09 - Activity Diagrams
 
Lesson02_Use Case Diagrams
Lesson02_Use Case DiagramsLesson02_Use Case Diagrams
Lesson02_Use Case Diagrams
 
05 use case
05 use case05 use case
05 use case
 
What is a_use_case
What is a_use_caseWhat is a_use_case
What is a_use_case
 
3 interaction and_state_modeling
3 interaction and_state_modeling3 interaction and_state_modeling
3 interaction and_state_modeling
 
chapter_5_5.ppt
chapter_5_5.pptchapter_5_5.ppt
chapter_5_5.ppt
 
Use case modeling
Use case modelingUse case modeling
Use case modeling
 
Usecase
UsecaseUsecase
Usecase
 
SE_Lec 08_UML Use Cases
SE_Lec 08_UML Use CasesSE_Lec 08_UML Use Cases
SE_Lec 08_UML Use Cases
 
Use case Modeling
Use case ModelingUse case Modeling
Use case Modeling
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
 
SE_RE-II-CH5 (3).pdf
SE_RE-II-CH5 (3).pdfSE_RE-II-CH5 (3).pdf
SE_RE-II-CH5 (3).pdf
 
Unit 3 system models
Unit 3 system modelsUnit 3 system models
Unit 3 system models
 
Unit 3(advanced state modeling & interaction meodelling)
Unit  3(advanced state modeling & interaction meodelling)Unit  3(advanced state modeling & interaction meodelling)
Unit 3(advanced state modeling & interaction meodelling)
 
SE18_Lec 09_UML Use Cases
SE18_Lec 09_UML Use CasesSE18_Lec 09_UML Use Cases
SE18_Lec 09_UML Use Cases
 
StructureofUseCases.pptx
StructureofUseCases.pptxStructureofUseCases.pptx
StructureofUseCases.pptx
 
Jar chapter 3
Jar chapter 3Jar chapter 3
Jar chapter 3
 
Use case diagram
Use case diagramUse case diagram
Use case diagram
 
Uml diagrams usecase
Uml diagrams usecaseUml diagrams usecase
Uml diagrams usecase
 

Mehr von Michael Heron

Meeple centred design - Board Game Accessibility
Meeple centred design - Board Game AccessibilityMeeple centred design - Board Game Accessibility
Meeple centred design - Board Game AccessibilityMichael Heron
 
Musings on misconduct
Musings on misconductMusings on misconduct
Musings on misconductMichael Heron
 
Accessibility Support with the ACCESS Framework
Accessibility Support with the ACCESS FrameworkAccessibility Support with the ACCESS Framework
Accessibility Support with the ACCESS FrameworkMichael Heron
 
ACCESS: A Technical Framework for Adaptive Accessibility Support
ACCESS:  A Technical Framework for Adaptive Accessibility SupportACCESS:  A Technical Framework for Adaptive Accessibility Support
ACCESS: A Technical Framework for Adaptive Accessibility SupportMichael Heron
 
Authorship and Autership
Authorship and AutershipAuthorship and Autership
Authorship and AutershipMichael Heron
 
Text parser based interaction
Text parser based interactionText parser based interaction
Text parser based interactionMichael Heron
 
GRPHICS08 - Raytracing and Radiosity
GRPHICS08 - Raytracing and RadiosityGRPHICS08 - Raytracing and Radiosity
GRPHICS08 - Raytracing and RadiosityMichael Heron
 
GRPHICS07 - Textures
GRPHICS07 - TexturesGRPHICS07 - Textures
GRPHICS07 - TexturesMichael Heron
 
GRPHICS05 - Rendering (2)
GRPHICS05 - Rendering (2)GRPHICS05 - Rendering (2)
GRPHICS05 - Rendering (2)Michael Heron
 
GRPHICS04 - Rendering (1)
GRPHICS04 - Rendering (1)GRPHICS04 - Rendering (1)
GRPHICS04 - Rendering (1)Michael Heron
 
GRPHICS03 - Graphical Representation
GRPHICS03 - Graphical RepresentationGRPHICS03 - Graphical Representation
GRPHICS03 - Graphical RepresentationMichael Heron
 
GRPHICS02 - Creating 3D Graphics
GRPHICS02 - Creating 3D GraphicsGRPHICS02 - Creating 3D Graphics
GRPHICS02 - Creating 3D GraphicsMichael Heron
 
GRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D GraphicsGRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D GraphicsMichael Heron
 
GRPHICS09 - Art Appreciation
GRPHICS09 - Art AppreciationGRPHICS09 - Art Appreciation
GRPHICS09 - Art AppreciationMichael Heron
 

Mehr von Michael Heron (20)

Meeple centred design - Board Game Accessibility
Meeple centred design - Board Game AccessibilityMeeple centred design - Board Game Accessibility
Meeple centred design - Board Game Accessibility
 
Musings on misconduct
Musings on misconductMusings on misconduct
Musings on misconduct
 
Accessibility Support with the ACCESS Framework
Accessibility Support with the ACCESS FrameworkAccessibility Support with the ACCESS Framework
Accessibility Support with the ACCESS Framework
 
ACCESS: A Technical Framework for Adaptive Accessibility Support
ACCESS:  A Technical Framework for Adaptive Accessibility SupportACCESS:  A Technical Framework for Adaptive Accessibility Support
ACCESS: A Technical Framework for Adaptive Accessibility Support
 
Authorship and Autership
Authorship and AutershipAuthorship and Autership
Authorship and Autership
 
Text parser based interaction
Text parser based interactionText parser based interaction
Text parser based interaction
 
SAD04 - Inheritance
SAD04 - InheritanceSAD04 - Inheritance
SAD04 - Inheritance
 
GRPHICS08 - Raytracing and Radiosity
GRPHICS08 - Raytracing and RadiosityGRPHICS08 - Raytracing and Radiosity
GRPHICS08 - Raytracing and Radiosity
 
GRPHICS07 - Textures
GRPHICS07 - TexturesGRPHICS07 - Textures
GRPHICS07 - Textures
 
GRPHICS06 - Shading
GRPHICS06 - ShadingGRPHICS06 - Shading
GRPHICS06 - Shading
 
GRPHICS05 - Rendering (2)
GRPHICS05 - Rendering (2)GRPHICS05 - Rendering (2)
GRPHICS05 - Rendering (2)
 
GRPHICS04 - Rendering (1)
GRPHICS04 - Rendering (1)GRPHICS04 - Rendering (1)
GRPHICS04 - Rendering (1)
 
GRPHICS03 - Graphical Representation
GRPHICS03 - Graphical RepresentationGRPHICS03 - Graphical Representation
GRPHICS03 - Graphical Representation
 
GRPHICS02 - Creating 3D Graphics
GRPHICS02 - Creating 3D GraphicsGRPHICS02 - Creating 3D Graphics
GRPHICS02 - Creating 3D Graphics
 
GRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D GraphicsGRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D Graphics
 
GRPHICS09 - Art Appreciation
GRPHICS09 - Art AppreciationGRPHICS09 - Art Appreciation
GRPHICS09 - Art Appreciation
 
2CPP18 - Modifiers
2CPP18 - Modifiers2CPP18 - Modifiers
2CPP18 - Modifiers
 
2CPP17 - File IO
2CPP17 - File IO2CPP17 - File IO
2CPP17 - File IO
 
2CPP16 - STL
2CPP16 - STL2CPP16 - STL
2CPP16 - STL
 
2CPP15 - Templates
2CPP15 - Templates2CPP15 - Templates
2CPP15 - Templates
 

Kürzlich hochgeladen

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 

Kürzlich hochgeladen (20)

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 

SAD06 - Use Case Diagrams

  • 1. + Use Case Diagrams Systems Analysis and Design Michael Heron
  • 2. + Introduction  We’ve spent a lot of time looking at class diagrams over the past few weeks.  This week we’re going to introduce a new diagraming notation.  Class diagrams represent a static view of the system.  They’re about the architecture of the system, how the code relates.  Today we’re going to talk about use case diagrams.  The first of our dynamic views of the system.  Use diagrams cover all the ways in which an individual may interest with our system.
  • 3. + Use Case Diagrams  Use case diagrams give a very high level overview of abstract interactions with a system.  We don’t care about how, we only care about what.  They allow us to have many different views of a system.  We may want a view for a normal user, a super user, a privileged user and so on.  Use-case diagrams are made up of four elements.  Actors  The System Itself  Use-Cases  Relationships between Use Cases
  • 5. + Use-Case Diagrams  Honestly, that’s how they look.  Honest.  The stick figure is the actor.  An individual or group of individuals who may interact with our system.  The box is the system.  In this case, a light switch.  The use cases are the circles.  Switch on and switch off.  The lines are the relationships.  A person has access to the switch on and switch off use cases.
  • 6. + Use Cases  You will see that there’s no relationship between individual use cases.  We don’t need to worry about how they work or what use cases they influence.  The diagram doesn’t show that before they are switched off they must be switched on.  We’ll handle that later.  Use cases represent each of the distinct activities that an actor may perform within our system.  They tell us then what functionality we will need to expose to a user in order for them to meet the system requirements.  This relates to visibility as discussed earlier in the module.
  • 7. + Actors  Actors need not be real people.  They can also be other computer systems.  Most actors are external entities.  We have no control over them or what they may choose to do.  All we have control over is what functionality our system will expose to them.  However, we may sometimes use use-case diagrams to show relationship between internal subsystems.  In this case we may have more control over how the system works, but we still represent them as external entities.
  • 9. + Another Example  The use case diagram doesn’t represent causality.  It doesn’t show in what order things must be done.  It shows the set of actions that an actor can perform.  A file server can’t request a page.  A web surfer can’t send a page.  We can also provide multiple use case diagrams for different actors.  In fact, we will almost certainly do this.  But wait, there’s more…
  • 11. + A Third Example  This diagram shows a subdivision of use cases.  Flash, Press Button and Release Button are separate activities.  The Take Picture use case will make use of each of these  All use-cases will be used at least once during the course of the use- case execution.  Not necessarily true in our example.  In this way we can show an association between individual use case elements.  This allows us to minimise the complexity of our diagram.  Limit the number of abstract actions an actor can perform.  It also allows us to reuse elements.  Important when it comes to documentation of use cases.
  • 13. + Representing Inheritance  Use Case Diagrams are part of the UML standard, and thus are Object Oriented diagrams.  So we need to be able to show inheritance.  For the majority of diagrams you develop, these probably will not be necessary.  Use case diagrams are most effective when they show abstract interaction.  But you have the uses and extends relationships if you need to represent something more complex or you need to cut down in documentation duplication.
  • 14. + Documenting Use Cases  The diagrams are only one aspect of a use case.  The next aspect is a use case description.  This is a meaty outline (sometimes on separate cards) of what each of the activities actually mean.  They will include as part of their design a series of scenarios.  Usually provided in pseudocode.  The scenarios will cover the steps taken to carry out the use- case.  Separate scenarios for exceptional conditions will also be provided.
  • 15. + Use Case Documentation  General comments and notes  Requirements: what it allows the actor to accomplish.  Constraints: Rules about what can and cannot be done with the use-case. These can be broken down into:  Pre-conditions  Post-conditions  Invariants  Scenarios that detail the steps that must be taken to carry out the use-case. May include a number of scenarios to show exceptional conditions.  Scenario diagrams that depict the processing - we haven’t covered these yet but we will in weeks to come.  Additional attributes such as a change log, version number, complexity rating, and so on.
  • 16. + Example Use Case: Deal Hand Requirements: Is used to ensure every player in a game of poker has five cards in their hand. Pre-Conditions: The deck has 52 cards Post-Conditions: All poker players have five cards Invariants: The sum of the number of cards in each players hand and in the remaining deck is 52. Scenarios: Normal flow of events: Let numPlayers be equal to the number of players repeat five times repeat a number of times equal to numPlayers Dealer removes card from top of deck Dealer deals card face-down to player Dealer moves clockwise to next player Player Sits Out Hand Let numPlayers be equal to the number of players minus one repeat five times repeat a number of times equal to numPlayers if current player is sitting out hand move onto next player Dealer removes card from top of deck Dealer deals card face-down to player Dealer moves clockwise to next player Scenario Diagrams: To follow Additonal Attributes: None as of yet
  • 17. + Use-Case Documentation  There is no need for scenarios to be 100% complete the first time.  As part of the additional attributes, we may include a formal change log.  However, identifying what each use-case is supposed to do helps in identifying:  Scope  Completeness  Overlap  Ambiguity  They can direct you to answer the right kinds of questions.
  • 18. + Identifying Use-Cases  As with classes, identifying use cases is part of the challenge.  For this we use a system called event decomposition.  This allows us to identify the events to which a system must respond and then working out how it actually responds.  We concentrate on external stimuli for this.  We treat our system as a black box.  We don’t know what’s going on inside it.  We just know there are ‘buttons we should be able to press’  We can do this through various ways.  Roleplaying, for example.
  • 19. + Event Decomposition  We look at three categories of events from the perspective of each actor.  External events – ones initiated by an external entity.  ‘I come along and press a button’  For this, we need to identify the set of all the actors in our system.  Who are we writing this for?  We list the entities, and then outline what we think the full set of actions they would perform might be.  Trying to identify the external entities in a piece of online retail software may introduce customers, administrators, and external web pages.
  • 20. + External Events Entity Transactions Customer Buy Book View shopping basket Make Payment Browse catalogue Query book details Query Account Web-Page Query Query book details Browse catalogue Administrator Buy Book View Shopping Basket Make Payment Browse Catalogue Query Book Details Update Book Details Update Customer Details Add Catalogue Entry Remove Catalogue Entry
  • 21. + Temporal Events  Temporal events are those that occur as a result of reaching a particular point in time.  End of the day  End of the week  End of the month  Most systems will do some kind of ‘batch processing’ at this point.  For simplicity of logistics.  We list, in a similar style to the external events, all of the time- related events we wish to capture.
  • 22. + State Events  State events are those that occur when the internal data of a system are altered to the point that system processing is required.  If the stock of an item drops below a number, order more stock.  Or send a message to procurement.  Usually these kind of state events occur as a consequence of other events.  A customer buys an item.  This triggers the state event.  They still need to be documented separately.
  • 23. + Identifying Events  As with objects and classes, identifying events is an intellectual activity.  This is a technique, not a guaranteed algorithm.  You still need to decide what makes sense and at what level of detail.  What constitutes a single event?  There’s no hard and fast rule.  One useful technique is to consider it based on atomicity.  If any significant time passes between one event and another, it’s two separate events.
  • 24. + Conclusion  Use case diagrams are part of the dynamic view of a system.  They gives us an overview of what interfaces our precious code must expose.  They come in the form of simple stick figures and boxes.  And lines.  They can represent both association and inheritance.  But we don’t worry too much about those until we need them.  Identifying events is hard.  And will only become easier with experience.  Event decomposition can help with this.