Use Case Diagram

Kumar
Kumar Administrator
Object Oriented Design and Analysis
Use Case Diagram
Object Oriented Design and Analysis
Introduction
Use-cases are descriptions of the functionality of a system
from a user perspective.

Depict the behaviour of the system, as it appears to an outside
user.

Describe the functionality and users (actors) of the system.

Show the relationships between the actors that use the
system, the use cases (functionality) they use, and the
relationship between different use cases.

Document the scope of the system.

Illustrate the developer’s understanding of the user’s
requirements.
Object Oriented Design and Analysis
Use Case Diagram, purpose
• Use case models are developed at different levels of abstraction
– system, system component, or a class.
• Use case modelling is an iterative and incremental process.
– If user requirements change, the changes should be made in all the
affected documents.
Requirements
document
(text in natural language)
Class
diagrams
Activity
diagrams
Sequence
diagrams
Statechart
diagrams
Object Oriented Design and Analysis
Use Case diagrams, basic UML notation
 Use Case: A Use Case is a description of a set of
interactions between a user and the system.
 Components of use case diagram:
 Actor
 Use case
 System boundary
 Relationship
use case name
use case name
use case name
Object Oriented Design and Analysis
Use cases: Information captured
• Actors
• Relationships with other use cases
• Pre-conditions
• Details
• Post-conditions
• Exceptions
• Constraints
• Alternatives
Object Oriented Design and Analysis
ACTOR
 An actor is some one or something that must
interact with the system under development
 Actors can be human or automated systems.
 Actors are not part of the system.
 UML notation for actor is stickman, shown below.
Student Faculty Employee
Object Oriented Design and Analysis
ACTOR (contd..)
• It is role a user plays with respect to system.
• Actors carry out use cases and a single actor
may perform more than one use cases.
• Actors are determined by observing the direct
uses of the system
Object Oriented Design and Analysis
Primary and Secondary Actors
• Primary Actor
– Acts on the system
– Initiates an interaction with the system
– Uses the system to fulfill his/her goal
– Events Something we don’t have control over
• Secondary Actor
– Is acted on/invoked/used by the system
– Helps the system to fulfills its goal
– Something the system uses to get its job done
Object Oriented Design and Analysis
USE CASE
What is USE case?
 A use case is a pattern of behavior, the system
exhibits
 The use cases are sequence of actions that the
user takes on a system to get particular target
 USE CASE is dialogue between an actor and the
system.
• Examples: Add a course
Object Oriented Design and Analysis
Contd..
• A use case typically represents a major piece of
functionality that is complete from beginning to end.
• Most of the use cases are generated in initial phase,
but may add some more after proceeding.
• A use case may be small or large. It captures a broad
view of a primary functionality of the system in a
manner that can be easily grasped by non technical
user.
Object Oriented Design and Analysis
System Boundary
 It is shown as a rectangle.
 It helps to identify what is external versus internal, and
what the responsibilities of the system are.
 The external environment is represented only by actors.
Object Oriented Design and Analysis
Relationship
• Relationship is an association between use case and actor.
• There are several Use Case relationships:
 Association
 Extend
 Generalization
 Uses
 Include
Object Oriented Design and Analysis
Extend Relationship
 The extended relationship is used to indicate that use
case completely consists of the behavior of another use
case at one or specific point
 use cases that extend the behavior of other core use
cases. Enable to factor variants
 The base use case implicitly incorporates the behavior of
another use case at certain points called extension
points
 It is shown as a dotted line with an arrow point and
labeled <<extend>>
Login
Register
New User
<< extend>>
Object Oriented Design and Analysis
Generalization
 Generalization is a relationship between a
general use case and a more specific use case
that inherits and extends features to it
 use cases that are specialized versions of other
use cases
 It is shown as a solid line with a hollow arrow
point
Object Oriented Design and Analysis
Uses Relationship
 When a use case uses another process, the
relationship can be shown with the uses
relationship
 This is shown as a solid line with a hollow arrow
point and the <<uses>> keyword
Object Oriented Design and Analysis
Include Relationship
 Include relationships insert additional behavior into a
base use case
 use cases that are included as parts of other use cases.
Enable to factor common behavior.
 The base use case explicitly incorporates the behavior of
another use case at a location specified in the base.
 They are shown as a dotted line with an open arrow and
the key word <<include>>
Object Oriented Design and Analysis
Extend vs Include
Object Oriented Design and Analysis
18
Example
place
phone call
cellular
network
user
receive
phone call
place
conference
call
receive
additional
call
use
scheduler
<<extend>>
<<extend>>
Cellular Telephone
Object Oriented Design and Analysis
Use Case Description
Each use case may include all or part of the following:
 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
Object Oriented Design and Analysis
Example- Money Withdraw
• Use Case: Withdraw Money
• Author: PKD
• Date: 11-09-2013
• Purpose: To withdraw some cash from user’s bank account
• Overview: The use case starts when the customer inserts his card
into the system. The system requests the user PIN. The system
validates the PIN. If the validation succeeded, the customer can
choose the withdraw operation else alternative 1 – validation
failure is executed. The customer enters the amount of cash to
withdraw. The system checks the amount of cash in the user
account, its credit limit. If the withdraw amount in the range
between the current amount + credit limit the system dispense
the cash and prints a withdraw receipt, else alternative 2 –
amount exceeded is executed.
• Cross References: R1.1, R1.2, R7
Object Oriented Design and Analysis
• 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
Object Oriented Design and Analysis
Typical course of events
Object Oriented Design and Analysis
• 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
Object Oriented Design and Analysis
 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 ?
1 von 24

Recomendados

Use case Diagram von
Use case DiagramUse case Diagram
Use case DiagramPreeti Mishra
1.8K views26 Folien
Software design von
Software designSoftware design
Software designSyed Muhammad Hammad-ud-Din
69K views30 Folien
SRS(software requirement specification) von
SRS(software requirement specification)SRS(software requirement specification)
SRS(software requirement specification)Akash Kumar Dhameja
31.3K views12 Folien
Use Case Diagram von
Use Case DiagramUse Case Diagram
Use Case DiagramAshesh R
68.1K views48 Folien
UML von
UMLUML
UMLiQra Rafaqat
8.3K views30 Folien
Use case diagram von
Use case diagramUse case diagram
Use case diagramCity University
814 views27 Folien

Más contenido relacionado

Was ist angesagt?

Software Process Models von
Software Process ModelsSoftware Process Models
Software Process ModelsHassan A-j
21.3K views52 Folien
Dynamic and Static Modeling von
Dynamic and Static ModelingDynamic and Static Modeling
Dynamic and Static ModelingSaurabh Kumar
109.7K views13 Folien
Overview of UML Diagrams von
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML DiagramsManish Kumar
13.8K views16 Folien
Uml class-diagram von
Uml class-diagramUml class-diagram
Uml class-diagramASHOK KUMAR PALAKI
24.2K views28 Folien
Object Oriented Design von
Object Oriented DesignObject Oriented Design
Object Oriented DesignSudarsun Santhiappan
46K views142 Folien
Introduction to Software Engineering von
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software EngineeringSaqib Raza
38.2K views42 Folien

Was ist angesagt?(20)

Software Process Models von Hassan A-j
Software Process ModelsSoftware Process Models
Software Process Models
Hassan A-j21.3K views
Dynamic and Static Modeling von Saurabh Kumar
Dynamic and Static ModelingDynamic and Static Modeling
Dynamic and Static Modeling
Saurabh Kumar109.7K views
Overview of UML Diagrams von Manish Kumar
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
Manish Kumar13.8K views
Introduction to Software Engineering von Saqib Raza
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software Engineering
Saqib Raza38.2K views
Activity diagram-UML diagram von Ramakant Soni
Activity diagram-UML diagramActivity diagram-UML diagram
Activity diagram-UML diagram
Ramakant Soni12.4K views
Software Engineering : Requirement Analysis & Specification von Ajit Nayak
Software Engineering : Requirement Analysis & SpecificationSoftware Engineering : Requirement Analysis & Specification
Software Engineering : Requirement Analysis & Specification
Ajit Nayak11.4K views
Use case Diagram von Rahul Pola
Use case Diagram Use case Diagram
Use case Diagram
Rahul Pola5.7K views
Software architecture design ppt von farazimlak
Software architecture design pptSoftware architecture design ppt
Software architecture design ppt
farazimlak3K views
Collaboration diagram- UML diagram von Ramakant Soni
Collaboration diagram- UML diagram Collaboration diagram- UML diagram
Collaboration diagram- UML diagram
Ramakant Soni9.1K views
Analysis modeling & scenario based modeling von Benazir Fathima
Analysis modeling &  scenario based modeling Analysis modeling &  scenario based modeling
Analysis modeling & scenario based modeling
Benazir Fathima5.9K views
Lecture 12 requirements modeling - (system analysis) von IIUI
Lecture 12   requirements modeling - (system analysis)Lecture 12   requirements modeling - (system analysis)
Lecture 12 requirements modeling - (system analysis)
IIUI4.9K views
object oriented methodologies von Amith Tiwari
object oriented methodologiesobject oriented methodologies
object oriented methodologies
Amith Tiwari13.3K views

Destacado

Lecture04- Use Case Diagrams von
Lecture04- Use Case DiagramsLecture04- Use Case Diagrams
Lecture04- Use Case Diagramsartgreen
21.2K views48 Folien
Use case-diagrams von
Use case-diagramsUse case-diagrams
Use case-diagramsMaoelana Noermoehammad
58K views20 Folien
Lecture#04, use case diagram von
Lecture#04, use case diagramLecture#04, use case diagram
Lecture#04, use case diagrambabak danyal
5.9K views24 Folien
Use Case Diagram Templates by Creately von
Use Case Diagram Templates by CreatelyUse Case Diagram Templates by Creately
Use Case Diagram Templates by CreatelyCreately
9.1K views28 Folien
Uml diagrams von
Uml diagramsUml diagrams
Uml diagramsbarney92
44.8K views39 Folien

Destacado(20)

Lecture04- Use Case Diagrams von artgreen
Lecture04- Use Case DiagramsLecture04- Use Case Diagrams
Lecture04- Use Case Diagrams
artgreen21.2K views
Lecture#04, use case diagram von babak danyal
Lecture#04, use case diagramLecture#04, use case diagram
Lecture#04, use case diagram
babak danyal5.9K views
Use Case Diagram Templates by Creately von Creately
Use Case Diagram Templates by CreatelyUse Case Diagram Templates by Creately
Use Case Diagram Templates by Creately
Creately9.1K views
Uml diagrams von barney92
Uml diagramsUml diagrams
Uml diagrams
barney9244.8K views
A&D - Use Case Diagram von vinay arora
A&D - Use Case DiagramA&D - Use Case Diagram
A&D - Use Case Diagram
vinay arora5.7K views
Use case Diagram and Sequence Diagram von Nikhil Pandit
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence Diagram
Nikhil Pandit20.2K views
Uml Presentation von mewaseem
Uml PresentationUml Presentation
Uml Presentation
mewaseem45.3K views
Use Case diagram-UML diagram-1 von Ramakant Soni
Use Case diagram-UML diagram-1Use Case diagram-UML diagram-1
Use Case diagram-UML diagram-1
Ramakant Soni2.9K views
The Ultimate Sequence Diagram Tutorial von Creately
The Ultimate Sequence Diagram TutorialThe Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram Tutorial
Creately935K views
Data Flow Diagram and USe Case Diagram von Kumar
Data Flow Diagram and USe Case DiagramData Flow Diagram and USe Case Diagram
Data Flow Diagram and USe Case Diagram
Kumar 21.1K views
Structured Vs, Object Oriented Analysis and Design von Motaz Saad
Structured Vs, Object Oriented Analysis and DesignStructured Vs, Object Oriented Analysis and Design
Structured Vs, Object Oriented Analysis and Design
Motaz Saad156.5K views
Workshop on Basics of Software Engineering (DFD, UML and Project Culture) von Dr Sukhpal Singh Gill
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Basic behavioral modeling chapter 3 of OMD von jayashri kolekar
Basic behavioral modeling chapter 3 of OMDBasic behavioral modeling chapter 3 of OMD
Basic behavioral modeling chapter 3 of OMD
jayashri kolekar2.5K views

Similar a Use Case Diagram

conversion-gate02.pptx von
conversion-gate02.pptxconversion-gate02.pptx
conversion-gate02.pptxNouraBaccar1
2 views24 Folien
OOAD U1.pptx von
OOAD U1.pptxOOAD U1.pptx
OOAD U1.pptxanguraju1
14 views68 Folien
Use case modeling von
Use case modelingUse case modeling
Use case modelingWajahat Hasnain
233 views32 Folien
Use case modeling & analysis v 1 von
Use case modeling & analysis v 1Use case modeling & analysis v 1
Use case modeling & analysis v 1JIGAR MAKHIJA
1.3K views22 Folien
2.1 usecase diagram von
2.1 usecase diagram2.1 usecase diagram
2.1 usecase diagramAshenafi Workie
628 views28 Folien
chapter_5_5.ppt von
chapter_5_5.pptchapter_5_5.ppt
chapter_5_5.pptMonirHossain707319
6 views71 Folien

Similar a Use Case Diagram(20)

Use case modeling & analysis v 1 von JIGAR MAKHIJA
Use case modeling & analysis v 1Use case modeling & analysis v 1
Use case modeling & analysis v 1
JIGAR MAKHIJA1.3K views
Requirement analysis and UML modelling in Software engineering von snehalkulkarni74
Requirement analysis and UML modelling in Software engineeringRequirement analysis and UML modelling in Software engineering
Requirement analysis and UML modelling in Software engineering
snehalkulkarni74528 views
Refining The System Definition von Sandeep Ganji
Refining The System DefinitionRefining The System Definition
Refining The System Definition
Sandeep Ganji1.2K views
Final use case (1) von 03028335403
Final use case (1)Final use case (1)
Final use case (1)
030283354032.3K views
Lab 3 Introduction to the UML - how to create a use case diagram von Farah Ahmed
Lab 3 Introduction to the UML - how to create a use case diagramLab 3 Introduction to the UML - how to create a use case diagram
Lab 3 Introduction to the UML - how to create a use case diagram
Farah Ahmed317 views
Presentation Use Case Diagram and Use Case Specification.pptx von azida3
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
azida324 views
Lecture7 use case modeling von Shahid Riaz
Lecture7 use case modelingLecture7 use case modeling
Lecture7 use case modeling
Shahid Riaz1.6K views
Use Case Analysis and Diagramming von Ornella Dunn
 Use Case Analysis and Diagramming Use Case Analysis and Diagramming
Use Case Analysis and Diagramming
Ornella Dunn560 views
Requirements Engineering Processes in Software Engineering SE6 von koolkampus
Requirements Engineering Processes in Software Engineering SE6Requirements Engineering Processes in Software Engineering SE6
Requirements Engineering Processes in Software Engineering SE6
koolkampus7.7K views

Más de Kumar

Graphics devices von
Graphics devicesGraphics devices
Graphics devicesKumar
6.6K views67 Folien
Fill area algorithms von
Fill area algorithmsFill area algorithms
Fill area algorithmsKumar
22.2K views45 Folien
region-filling von
region-fillingregion-filling
region-fillingKumar
9.2K views81 Folien
Bresenham derivation von
Bresenham derivationBresenham derivation
Bresenham derivationKumar
1K views3 Folien
Bresenham circles and polygons derication von
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons dericationKumar
2.9K views59 Folien
Introductionto xslt von
Introductionto xsltIntroductionto xslt
Introductionto xsltKumar
1.4K views63 Folien

Más de Kumar (20)

Graphics devices von Kumar
Graphics devicesGraphics devices
Graphics devices
Kumar 6.6K views
Fill area algorithms von Kumar
Fill area algorithmsFill area algorithms
Fill area algorithms
Kumar 22.2K views
region-filling von Kumar
region-fillingregion-filling
region-filling
Kumar 9.2K views
Bresenham derivation von Kumar
Bresenham derivationBresenham derivation
Bresenham derivation
Kumar 1K views
Bresenham circles and polygons derication von Kumar
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons derication
Kumar 2.9K views
Introductionto xslt von Kumar
Introductionto xsltIntroductionto xslt
Introductionto xslt
Kumar 1.4K views
Extracting data from xml von Kumar
Extracting data from xmlExtracting data from xml
Extracting data from xml
Kumar 765 views
Xml basics von Kumar
Xml basicsXml basics
Xml basics
Kumar 959 views
XML Schema von Kumar
XML SchemaXML Schema
XML Schema
Kumar 4.3K views
Publishing xml von Kumar
Publishing xmlPublishing xml
Publishing xml
Kumar 468 views
DTD von Kumar
DTDDTD
DTD
Kumar 1.1K views
Applying xml von Kumar
Applying xmlApplying xml
Applying xml
Kumar 492 views
Introduction to XML von Kumar
Introduction to XMLIntroduction to XML
Introduction to XML
Kumar 918 views
How to deploy a j2ee application von Kumar
How to deploy a j2ee applicationHow to deploy a j2ee application
How to deploy a j2ee application
Kumar 628 views
JNDI, JMS, JPA, XML von Kumar
JNDI, JMS, JPA, XMLJNDI, JMS, JPA, XML
JNDI, JMS, JPA, XML
Kumar 738 views
EJB Fundmentals von Kumar
EJB FundmentalsEJB Fundmentals
EJB Fundmentals
Kumar 336 views
JSP and struts programming von Kumar
JSP and struts programmingJSP and struts programming
JSP and struts programming
Kumar 1.2K views
java servlet and servlet programming von Kumar
java servlet and servlet programmingjava servlet and servlet programming
java servlet and servlet programming
Kumar 2.1K views
Introduction to JDBC and JDBC Drivers von Kumar
Introduction to JDBC and JDBC DriversIntroduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC Drivers
Kumar 515 views
Introduction to J2EE von Kumar
Introduction to J2EEIntroduction to J2EE
Introduction to J2EE
Kumar 422 views

Último

AI and Ml presentation .pptx von
AI and Ml presentation .pptxAI and Ml presentation .pptx
AI and Ml presentation .pptxFayazAli87
12 views15 Folien
predicting-m3-devopsconMunich-2023.pptx von
predicting-m3-devopsconMunich-2023.pptxpredicting-m3-devopsconMunich-2023.pptx
predicting-m3-devopsconMunich-2023.pptxTier1 app
7 views24 Folien
SAP FOR TYRE INDUSTRY.pdf von
SAP FOR TYRE INDUSTRY.pdfSAP FOR TYRE INDUSTRY.pdf
SAP FOR TYRE INDUSTRY.pdfVirendra Rai, PMP
24 views3 Folien
Agile 101 von
Agile 101Agile 101
Agile 101John Valentino
9 views20 Folien
FIMA 2023 Neo4j & FS - Entity Resolution.pptx von
FIMA 2023 Neo4j & FS - Entity Resolution.pptxFIMA 2023 Neo4j & FS - Entity Resolution.pptx
FIMA 2023 Neo4j & FS - Entity Resolution.pptxNeo4j
8 views26 Folien
Generic or specific? Making sensible software design decisions von
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsBert Jan Schrijver
6 views60 Folien

Último(20)

AI and Ml presentation .pptx von FayazAli87
AI and Ml presentation .pptxAI and Ml presentation .pptx
AI and Ml presentation .pptx
FayazAli8712 views
predicting-m3-devopsconMunich-2023.pptx von Tier1 app
predicting-m3-devopsconMunich-2023.pptxpredicting-m3-devopsconMunich-2023.pptx
predicting-m3-devopsconMunich-2023.pptx
Tier1 app7 views
FIMA 2023 Neo4j & FS - Entity Resolution.pptx von Neo4j
FIMA 2023 Neo4j & FS - Entity Resolution.pptxFIMA 2023 Neo4j & FS - Entity Resolution.pptx
FIMA 2023 Neo4j & FS - Entity Resolution.pptx
Neo4j8 views
Generic or specific? Making sensible software design decisions von Bert Jan Schrijver
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
Navigating container technology for enhanced security by Niklas Saari von Metosin Oy
Navigating container technology for enhanced security by Niklas SaariNavigating container technology for enhanced security by Niklas Saari
Navigating container technology for enhanced security by Niklas Saari
Metosin Oy14 views
tecnologia18.docx von nosi6702
tecnologia18.docxtecnologia18.docx
tecnologia18.docx
nosi67025 views
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra... von Marc Müller
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra....NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
Marc Müller40 views
JioEngage_Presentation.pptx von admin125455
JioEngage_Presentation.pptxJioEngage_Presentation.pptx
JioEngage_Presentation.pptx
admin1254556 views
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ... von Donato Onofri
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Donato Onofri860 views

Use Case Diagram

  • 1. Object Oriented Design and Analysis Use Case Diagram
  • 2. Object Oriented Design and Analysis Introduction Use-cases are descriptions of the functionality of a system from a user perspective.  Depict the behaviour of the system, as it appears to an outside user.  Describe the functionality and users (actors) of the system.  Show the relationships between the actors that use the system, the use cases (functionality) they use, and the relationship between different use cases.  Document the scope of the system.  Illustrate the developer’s understanding of the user’s requirements.
  • 3. Object Oriented Design and Analysis Use Case Diagram, purpose • Use case models are developed at different levels of abstraction – system, system component, or a class. • Use case modelling is an iterative and incremental process. – If user requirements change, the changes should be made in all the affected documents. Requirements document (text in natural language) Class diagrams Activity diagrams Sequence diagrams Statechart diagrams
  • 4. Object Oriented Design and Analysis Use Case diagrams, basic UML notation  Use Case: A Use Case is a description of a set of interactions between a user and the system.  Components of use case diagram:  Actor  Use case  System boundary  Relationship use case name use case name use case name
  • 5. Object Oriented Design and Analysis Use cases: Information captured • Actors • Relationships with other use cases • Pre-conditions • Details • Post-conditions • Exceptions • Constraints • Alternatives
  • 6. Object Oriented Design and Analysis ACTOR  An actor is some one or something that must interact with the system under development  Actors can be human or automated systems.  Actors are not part of the system.  UML notation for actor is stickman, shown below. Student Faculty Employee
  • 7. Object Oriented Design and Analysis ACTOR (contd..) • It is role a user plays with respect to system. • Actors carry out use cases and a single actor may perform more than one use cases. • Actors are determined by observing the direct uses of the system
  • 8. Object Oriented Design and Analysis Primary and Secondary Actors • Primary Actor – Acts on the system – Initiates an interaction with the system – Uses the system to fulfill his/her goal – Events Something we don’t have control over • Secondary Actor – Is acted on/invoked/used by the system – Helps the system to fulfills its goal – Something the system uses to get its job done
  • 9. Object Oriented Design and Analysis USE CASE What is USE case?  A use case is a pattern of behavior, the system exhibits  The use cases are sequence of actions that the user takes on a system to get particular target  USE CASE is dialogue between an actor and the system. • Examples: Add a course
  • 10. Object Oriented Design and Analysis Contd.. • A use case typically represents a major piece of functionality that is complete from beginning to end. • Most of the use cases are generated in initial phase, but may add some more after proceeding. • A use case may be small or large. It captures a broad view of a primary functionality of the system in a manner that can be easily grasped by non technical user.
  • 11. Object Oriented Design and Analysis System Boundary  It is shown as a rectangle.  It helps to identify what is external versus internal, and what the responsibilities of the system are.  The external environment is represented only by actors.
  • 12. Object Oriented Design and Analysis Relationship • Relationship is an association between use case and actor. • There are several Use Case relationships:  Association  Extend  Generalization  Uses  Include
  • 13. Object Oriented Design and Analysis Extend Relationship  The extended relationship is used to indicate that use case completely consists of the behavior of another use case at one or specific point  use cases that extend the behavior of other core use cases. Enable to factor variants  The base use case implicitly incorporates the behavior of another use case at certain points called extension points  It is shown as a dotted line with an arrow point and labeled <<extend>> Login Register New User << extend>>
  • 14. Object Oriented Design and Analysis Generalization  Generalization is a relationship between a general use case and a more specific use case that inherits and extends features to it  use cases that are specialized versions of other use cases  It is shown as a solid line with a hollow arrow point
  • 15. Object Oriented Design and Analysis Uses Relationship  When a use case uses another process, the relationship can be shown with the uses relationship  This is shown as a solid line with a hollow arrow point and the <<uses>> keyword
  • 16. Object Oriented Design and Analysis Include Relationship  Include relationships insert additional behavior into a base use case  use cases that are included as parts of other use cases. Enable to factor common behavior.  The base use case explicitly incorporates the behavior of another use case at a location specified in the base.  They are shown as a dotted line with an open arrow and the key word <<include>>
  • 17. Object Oriented Design and Analysis Extend vs Include
  • 18. Object Oriented Design and Analysis 18 Example place phone call cellular network user receive phone call place conference call receive additional call use scheduler <<extend>> <<extend>> Cellular Telephone
  • 19. Object Oriented Design and Analysis Use Case Description Each use case may include all or part of the following:  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
  • 20. Object Oriented Design and Analysis Example- Money Withdraw • Use Case: Withdraw Money • Author: PKD • Date: 11-09-2013 • Purpose: To withdraw some cash from user’s bank account • Overview: The use case starts when the customer inserts his card into the system. The system requests the user PIN. The system validates the PIN. If the validation succeeded, the customer can choose the withdraw operation else alternative 1 – validation failure is executed. The customer enters the amount of cash to withdraw. The system checks the amount of cash in the user account, its credit limit. If the withdraw amount in the range between the current amount + credit limit the system dispense the cash and prints a withdraw receipt, else alternative 2 – amount exceeded is executed. • Cross References: R1.1, R1.2, R7
  • 21. Object Oriented Design and Analysis • 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
  • 22. Object Oriented Design and Analysis Typical course of events
  • 23. Object Oriented Design and Analysis • 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
  • 24. Object Oriented Design and Analysis  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 ?