SlideShare a Scribd company logo
USE CASES In this lecture: Use cases - What are use cases? - Why to use use cases? - How to write use cases? - What use cases are good for?
Use Cases - Why? The users are usually not able to produce sufficient formal descriptions of the functionalities. A simple list of the required functionalities is not good enough. The informal general description by the users hardly does the job, either. The users may be able to describe by examples how they would want to use the system or how they perform certain tasks.
An Example: Raising A Salary ” The user finds the salary data of the employee whose salary is to be raised. The user chooses the ”raise salary” functionality. The system raises a dialogue into which the user types the percentage and commits the raise.” It may be possible to specify preconditions and postconditions and exceptions to the processing of a use case. The example above had none of them.
A Definition ” When a user uses the system, she or he will perform a behaviourally related sequence of transactions in a dialogue with the system. We call such a special sequence a use case.” … ”A use case is a sequence of transactions in a system whose task is to yield a measurable value to an individual actor of the system.” (I. Jacobsen) The word ”transaction” does not mean exactly the same as the technical term ”transaction” in database terminology. A use case is a story about the usage of the system told from an end user’s perspective.
Elements Of A Use Case (1/2) Use Case Name - identifies the use case Version Summary - What is it all about? Frequencey - How often the use case is performed? Usability Requirements - The most important aspects ensuring that the use case can be performed safely and efficiently Actors - The role of the people and other systems interacting with the system -  to be continued …
Elements Of A Use Case (2/2) Preconditions - When can the use case take place? - can be another use case Description – The story! Exceptions  Illustrations Postconditions - Conditions which must hold after the use case
Example Revisited (1/3) Name: SalaryRaise Version: 0.9 Summary: User raises an employees salary Frequency: 5 times per day Usability Requirements: Actors: The user, the employee database Preconditions: The user has the rights to search and modify the employees salary data.
Example Revisited (2/3) Description: The user finds the salary data of the employee whose salary is to be raised by employee number. [Exception: Employee not found] The user chooses the ”raise salary” functionality.[Exception: No rights to raise salary] The system raises a dialogue into which the user types the percentage and commits the raise [Exception: Maximum salary exceeded]
Example Revisited (3/3) Exceptions: - Employee not found: Raised if no employee data can be found with the given number. Error information is shown. - No rights to raise the salary. Raised if the user has no rights to  update salary data for this employee. Error information is shown. - Maximum salary exceeded: …
What Can Use Cases Be Used For? To give concrete examples of the things we are supposed to be implementing. To give more flesh to the requirements specifications. As a source for analysis phase As input for the user’s guide As the basis for system testing
UML We will use UML (Unified Modelling Language) in some of the examples of the course. The slides will introduce some of the necessary notation. UML is a language, which has been obtained by merging different languages and features, some made for equal purposes, and therefore one should not aim for using all of UML in a software project. Much rather, pick what you need.
UML Use Case Diagram A use case diagram represents use cases and the participating actors external to the system. A use case may also include (use) another use case – this is represented as an arrow. If a use case diagram gets too large, it may be divided into logical collections of use cases.
The Salary Raise Example Raise a salary User Salary system
Several use cases Booking Returning Service Customer Official <<include>> Vehicle rental system Using
Use Cases As A Part Of The Requirements Specification Use cases should specify the most important functional requirements For each functionality specified in the requirements there should be one or more use cases. In principle, the use cases are used to clarify the functional specifications and to show how different functional specifications relate to each other. However, by reading through the use cases it may be possible to identify system components (hardware and software) which have been neglected in the requirements specification.
What Should Be Chosen As A Use Case? Meaningful for implementation Valuable for the user (or customer) as such Too broad use cases are either too complex to understand or too vague to be useful. Too narrow use cases are either too detailed or describe fairly trivial events.
A Use Case Is Just An Example A use case depicts a typical way of using the system - but nothing more. The use cases are not meant to describe all ways to peform one task. Other ways can be described in other use cases or in the ”Exceptions” section. A software designer may easily try to cover every possibility in the story. This is not meant to be done here.
Stylistic Issues For Use Cases Try to read the use case through – if you get stuck, the use case is probably too vague. A use case should be a complete story, which starts from somewhere and ends up somewhere. It must make clear how and when it starts and how and when it finishes. A use case should have an explicit flow of actions: ”I took the pizza from the fridge and put it in the microwave. I set the time to 2 minutes and put it on. When it was ready I took it out and ate it.”
More Stylistic Issues A use case must be simple and straightforward It must be so explicit that it can be argued about. If nobody disagrees with the first version of a use case, it is probably too vague.
How Long Should A Use Case Be? A rule of thumb: It is usually good if the use case fits in one page. Long use cases are hard to understand. They may be too detailed or they try to cover too much functionality. In the latter case you may be able to break up the use case into several use cases.
How To Find The Use Cases? You (as the analyst) are not supposed to invent them, as they express the way the users intent to do things.  So, you must identify the functionalities and talk with the users. Use cases are simple, the users should be able to provide you with the stories. You can discuss these stories and try to find out if things could/should be done differently. The use cases can be refined and modified later, but it will produce extra work. Make enough use cases!

More Related Content

PPT
Uml use casediagrams assignment help
PDF
Use Case TABLE with Actors & Goals
PPT
Use case modeling
PDF
Advanced Use Case Diagram and Model
PPT
2b writing good use cases
PPT
Intro to UML - Use Case diagrams
PDF
Lecture7 use case modeling
PPTX
Activity diagram tutorial part 2
Uml use casediagrams assignment help
Use Case TABLE with Actors & Goals
Use case modeling
Advanced Use Case Diagram and Model
2b writing good use cases
Intro to UML - Use Case diagrams
Lecture7 use case modeling
Activity diagram tutorial part 2

What's hot (17)

PPT
Use Case Model
PDF
Use case diagrams
PPT
Use Case Modeling
PPTX
Use case diagrams 2014
PPT
4b use-case analysis
PPTX
Use Case Analysis and Diagramming
PPTX
Use Case Modeling In UML
PDF
Webinar: The Use Case Study An Overview
PPT
Chapter5
PPTX
Class Diagram Templates by Creately
PDF
PPTX
Software engineering
PPT
Use Case and Activity Diagrams Modeling Notation
PDF
Artificial Intelligence & QA
PPT
ASP.NET System design 2
PDF
Introduction to programming by MUFIX Commnity
Use Case Model
Use case diagrams
Use Case Modeling
Use case diagrams 2014
4b use-case analysis
Use Case Analysis and Diagramming
Use Case Modeling In UML
Webinar: The Use Case Study An Overview
Chapter5
Class Diagram Templates by Creately
Software engineering
Use Case and Activity Diagrams Modeling Notation
Artificial Intelligence & QA
ASP.NET System design 2
Introduction to programming by MUFIX Commnity
Ad

Viewers also liked (6)

PPT
B C T S Presenation V
PPS
Cuentecitos
PDF
Maruti Dzire Brochure
PPT
PresentacióN Compras
PPT
Del Blog al PLE y a las Redes Sociales
PPT
Proyecto Agua Mhcv 2008
B C T S Presenation V
Cuentecitos
Maruti Dzire Brochure
PresentacióN Compras
Del Blog al PLE y a las Redes Sociales
Proyecto Agua Mhcv 2008
Ad

Similar to Use Cases (20)

PPTX
Lecture no 8 use case modeling and use case diagrams
PPT
Use Cases A Comprehensive Look
PPT
Use Case approach
PPT
Use Case Diagram
PPTX
02-use_cases in Unified modeling languages
PPTX
Lecture#04, use case diagram
PPTX
Use case modeling & analysis v 1
PPT
Use cases
PDF
Use case diagrams
PPTX
USE case diagrams.ppt.pptx..............
PDF
Use case diagrams
PPTX
Use Case Diagram on real world scenaios.pptx
PPT
PPT
Usecase
PPTX
Lab 3 Introduction to the UML - how to create a use case diagram
PPTX
PPTX
use_case+use_case description.pptx
PPT
How to write use cases
PPTX
Chapter 4.pptx
PPTX
Why the use case
Lecture no 8 use case modeling and use case diagrams
Use Cases A Comprehensive Look
Use Case approach
Use Case Diagram
02-use_cases in Unified modeling languages
Lecture#04, use case diagram
Use case modeling & analysis v 1
Use cases
Use case diagrams
USE case diagrams.ppt.pptx..............
Use case diagrams
Use Case Diagram on real world scenaios.pptx
Usecase
Lab 3 Introduction to the UML - how to create a use case diagram
use_case+use_case description.pptx
How to write use cases
Chapter 4.pptx
Why the use case

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
A Presentation on Artificial Intelligence
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
1 - Historical Antecedents, Social Consideration.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PPTX
Tartificialntelligence_presentation.pptx
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Getting Started with Data Integration: FME Form 101
PDF
project resource management chapter-09.pdf
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
DP Operators-handbook-extract for the Mautical Institute
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
A Presentation on Artificial Intelligence
Chapter 5: Probability Theory and Statistics
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
1 - Historical Antecedents, Social Consideration.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Web App vs Mobile App What Should You Build First.pdf
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Tartificialntelligence_presentation.pptx
Hindi spoken digit analysis for native and non-native speakers
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Heart disease approach using modified random forest and particle swarm optimi...
Getting Started with Data Integration: FME Form 101
project resource management chapter-09.pdf
Zenith AI: Advanced Artificial Intelligence
NewMind AI Weekly Chronicles - August'25-Week II
Group 1 Presentation -Planning and Decision Making .pptx
Unlocking AI with Model Context Protocol (MCP)
DP Operators-handbook-extract for the Mautical Institute

Use Cases

  • 1. USE CASES In this lecture: Use cases - What are use cases? - Why to use use cases? - How to write use cases? - What use cases are good for?
  • 2. Use Cases - Why? The users are usually not able to produce sufficient formal descriptions of the functionalities. A simple list of the required functionalities is not good enough. The informal general description by the users hardly does the job, either. The users may be able to describe by examples how they would want to use the system or how they perform certain tasks.
  • 3. An Example: Raising A Salary ” The user finds the salary data of the employee whose salary is to be raised. The user chooses the ”raise salary” functionality. The system raises a dialogue into which the user types the percentage and commits the raise.” It may be possible to specify preconditions and postconditions and exceptions to the processing of a use case. The example above had none of them.
  • 4. A Definition ” When a user uses the system, she or he will perform a behaviourally related sequence of transactions in a dialogue with the system. We call such a special sequence a use case.” … ”A use case is a sequence of transactions in a system whose task is to yield a measurable value to an individual actor of the system.” (I. Jacobsen) The word ”transaction” does not mean exactly the same as the technical term ”transaction” in database terminology. A use case is a story about the usage of the system told from an end user’s perspective.
  • 5. Elements Of A Use Case (1/2) Use Case Name - identifies the use case Version Summary - What is it all about? Frequencey - How often the use case is performed? Usability Requirements - The most important aspects ensuring that the use case can be performed safely and efficiently Actors - The role of the people and other systems interacting with the system - to be continued …
  • 6. Elements Of A Use Case (2/2) Preconditions - When can the use case take place? - can be another use case Description – The story! Exceptions Illustrations Postconditions - Conditions which must hold after the use case
  • 7. Example Revisited (1/3) Name: SalaryRaise Version: 0.9 Summary: User raises an employees salary Frequency: 5 times per day Usability Requirements: Actors: The user, the employee database Preconditions: The user has the rights to search and modify the employees salary data.
  • 8. Example Revisited (2/3) Description: The user finds the salary data of the employee whose salary is to be raised by employee number. [Exception: Employee not found] The user chooses the ”raise salary” functionality.[Exception: No rights to raise salary] The system raises a dialogue into which the user types the percentage and commits the raise [Exception: Maximum salary exceeded]
  • 9. Example Revisited (3/3) Exceptions: - Employee not found: Raised if no employee data can be found with the given number. Error information is shown. - No rights to raise the salary. Raised if the user has no rights to update salary data for this employee. Error information is shown. - Maximum salary exceeded: …
  • 10. What Can Use Cases Be Used For? To give concrete examples of the things we are supposed to be implementing. To give more flesh to the requirements specifications. As a source for analysis phase As input for the user’s guide As the basis for system testing
  • 11. UML We will use UML (Unified Modelling Language) in some of the examples of the course. The slides will introduce some of the necessary notation. UML is a language, which has been obtained by merging different languages and features, some made for equal purposes, and therefore one should not aim for using all of UML in a software project. Much rather, pick what you need.
  • 12. UML Use Case Diagram A use case diagram represents use cases and the participating actors external to the system. A use case may also include (use) another use case – this is represented as an arrow. If a use case diagram gets too large, it may be divided into logical collections of use cases.
  • 13. The Salary Raise Example Raise a salary User Salary system
  • 14. Several use cases Booking Returning Service Customer Official <<include>> Vehicle rental system Using
  • 15. Use Cases As A Part Of The Requirements Specification Use cases should specify the most important functional requirements For each functionality specified in the requirements there should be one or more use cases. In principle, the use cases are used to clarify the functional specifications and to show how different functional specifications relate to each other. However, by reading through the use cases it may be possible to identify system components (hardware and software) which have been neglected in the requirements specification.
  • 16. What Should Be Chosen As A Use Case? Meaningful for implementation Valuable for the user (or customer) as such Too broad use cases are either too complex to understand or too vague to be useful. Too narrow use cases are either too detailed or describe fairly trivial events.
  • 17. A Use Case Is Just An Example A use case depicts a typical way of using the system - but nothing more. The use cases are not meant to describe all ways to peform one task. Other ways can be described in other use cases or in the ”Exceptions” section. A software designer may easily try to cover every possibility in the story. This is not meant to be done here.
  • 18. Stylistic Issues For Use Cases Try to read the use case through – if you get stuck, the use case is probably too vague. A use case should be a complete story, which starts from somewhere and ends up somewhere. It must make clear how and when it starts and how and when it finishes. A use case should have an explicit flow of actions: ”I took the pizza from the fridge and put it in the microwave. I set the time to 2 minutes and put it on. When it was ready I took it out and ate it.”
  • 19. More Stylistic Issues A use case must be simple and straightforward It must be so explicit that it can be argued about. If nobody disagrees with the first version of a use case, it is probably too vague.
  • 20. How Long Should A Use Case Be? A rule of thumb: It is usually good if the use case fits in one page. Long use cases are hard to understand. They may be too detailed or they try to cover too much functionality. In the latter case you may be able to break up the use case into several use cases.
  • 21. How To Find The Use Cases? You (as the analyst) are not supposed to invent them, as they express the way the users intent to do things. So, you must identify the functionalities and talk with the users. Use cases are simple, the users should be able to provide you with the stories. You can discuss these stories and try to find out if things could/should be done differently. The use cases can be refined and modified later, but it will produce extra work. Make enough use cases!