SlideShare une entreprise Scribd logo
1  sur  31
Use Cases

                                   Chapter 3




Object-Oriented Software Systems Engineering – Chapter 3   Slide 1
Objectives

 In this chapter we will:
  Describe use case modelling
  Introduce use cases and actors
  Discuss relationships between use cases
  Introduce use case descriptions




Object-Oriented Software Systems Engineering – Chapter 3   Slide 2
Use Case Modelling

  The purpose of use case modelling
    to decide and describe the functional
       requirements of the system
      to give clear and consistent description of what
       the system should do
      to provide a basis for performing tests that
       verify the system
      to provide the ability to trace functional
       requirements into classes and operations
  Use case model
    represents use-case view
    is described by a use-case diagram

Object-Oriented Software Systems Engineering – Chapter 3   Slide 3
Use Case Modelling


         Use Cases are described using both text
                documents and diagrams

          Use-case modelling is primarily an act
        of writing text NOT just drawing diagrams




Object-Oriented Software Systems Engineering – Chapter 3   Slide 4
Use Case Modelling

  Definition of use case
     represents a complete functionality as perceived by an actor
     a set of sequences of actions a system performs that yield
      an observable result of value to a particular actor
  Characteristics
     is always initiated by an actor
     provides tangible value to an actor (observable not
      necessary salient)
     is complete - use case is not complete until an end value is
      produced even if several communications occur along the
      way
  Scenario’s are instances of use-cases
     A specific sequence of actions that illustrate behaviour
     You’ll find primary scenarios and secondary scenarios

Object-Oriented Software Systems Engineering – Chapter 3   Slide 5
Use Case Modelling – terms & concepts


                                  Name of System




              An Actor               A Use Case




Object-Oriented Software Systems Engineering – Chapter 3   Slide 6
Use Case Modelling – terms & concepts

  The system boundary
     defines responsibility
     black box that provides use-cases
     within the system boundary
            what the system does but not how the system does

  Use-cases
       a description of a set of sequence of actions, including
        variants that the system performs to yield an observable
        value to an actor
       a set of scenarios




Object-Oriented Software Systems Engineering – Chapter 3     Slide 7
Use Case Modelling – terms & concepts

  Actor
       representing a role that someone might play, rather than
        a particular individual
       external entity that has interest in interacting with the
        system
  Interaction
       a communication relation between an actor and a use
        case




Object-Oriented Software Systems Engineering – Chapter 3        Slide 8
Identifying Use Cases and Actors

  What functions does the actor require from the
   system?
  Does the actor need to read, create, destroy,
   modify or store some kind of data in the system?
  Does the actor have to be notified about events in
   the system, or does the actor need to confirm with
   the system for something?
  Could the actor’s daily work be simplified or made
   more efficient via new functions in the system?
  What input/output does the system need?
  Can these requirements be handled by one actor
   or someone else as well?

Object-Oriented Software Systems Engineering – Chapter 3   Slide 9
Use Case Modelling – organising use cases
                                              Communication Association
UML use-case diagram

                                   An Actor                                A Use Case




Communication associations:                                 UseCase 1
connect actors to use cases
                                            User 1
                                                            UseCase 2
                                                                          Manager


                                                            UseCase 3
                                            User 2




 Object-Oriented Software Systems Engineering – Chapter 3                   Slide 10
Use Case Modelling – types of relationships

  Relationships between actors
     generalization - specialization




                                   Library User




                        Student                     Lecturer

Object-Oriented Software Systems Engineering – Chapter 3       Slide 11
Use Case Modelling – types of relationships

         Two stereotypes of dependency relationship in use cases

Include                                          Extends
 specifies that the source use case               specifies that the target use case
 (A) explicitly incorporates the                  (B) extends the behaviour of the
 behaviour of the target (B)                      source (A)

 A includes the behaviour of B                    A is extended from B by adding
                                                  some actions




             <<include>>                                     <<extends>>
                                               Extension points

    A                               B                A                           B

 Object-Oriented Software Systems Engineering – Chapter 3                   Slide 12
Use Case Relationships

  Extend and Uses relationship - different forms of re-use
   Extend relationship - accounts for optional behaviour
   Include relationship -uses or include relationship
        one use case uses another use case
        (reuse by composition)

                <<extends>>             Place rush
                (set priority)          order


                                                           Check password
       Place order           <<uses>>
       Extension points
       set priority                     Vaildate user
                                                               Retinal scan


Object-Oriented Software Systems Engineering – Chapter 3              Slide 13
part 1
               A Simple Use Case Diagram of Library
                                        Library System

                           Search for                               Update
                             book                                   catalog

  Library
  Member                                   <<extend>>
                           Borrow a
                                            over limit                Refuse
                          copy of book                                            Librarian
                                                                       loan



                                                             Reserve a book
                            Return a
                                                   e>>
                          copy of book     <<includ
                                                                >
                                                           d e>
                                                   in   clu
   Member of                                    <<
     Staff                 Extend loan


Object-Oriented Software Systems Engineering – Chapter 3                       Slide 14
Use Case Diagram - order processing

                    Place order                               Customer
                                         <<extend>>           discount
                  extension points
                                          <<i
                    set discount              ncl




                               <<
                                                  ude
                                                     >>




                                  inc


                                               <<
                                                            Give product




                                     lud


                                                nci
                                                            information




                                        e>


                                                   lu
Customer



                                           >


                                                     de
                   Cancel order           <<i




                                                       >>
                                              ncl
                                                  ude
                                                     >>
                                  <<                          Update
                                    in
                                      cl                      account
                     Return             ud                                    Inventory
                     product              e>                                   system
                                       <<i  >
                                             nclu
                                                    de>
                                                       >    Update product
                                                              quantities
                     Get status
                      on order
                                                                             Accounting
Sales Rep
                                                                               system
                      Run sales
                       report

   Object-Oriented Software Systems Engineering – Chapter 3                  Slide 15
Use Case Diagram - course management
                               Course Management System

                                                        Select
                                Register for          courses to
                                 courses                teach
      Student

                                                        Request                 Lecturer
                                                      course roster
   Billing system                Create
                                 course                 Maintain
                                catalogue             course’s infor.


                                  Maintain                Maintain
                                information            lecturer’s infor.
   Registrar
                                                              Maintain
                                                           student’s infor

Object-Oriented Software Systems Engineering – Chapter 3                     Slide 16
UseCase 1
Use Case          Actor 1
diagram                                           UseCase 2
                                                                       Manager


                 Actor 2              UseCase 3




                           Class 2                   Class 1

 Class                                                                            State
diagram                                                                          diagram
                         Class 3                     Class 4




             <<Actor>>                                                             state 1
               User                  c2: object           c3: object
Sequence
                       0: event                                                    state 2
 diagram
                                           1: operation         2: operation
  Object-Oriented Software Systems Engineering – Chapter 3                          Slide 17
UseCase 1
               Actor 1
Use Case                                    UseCase 2
diagram                                                            Manager


              Actor 2           UseCase 3




                                            Class 2                  Class 1

 Class
diagram                                                                          State
                                        Class 3                      Class 4    diagram



           <<Actor>>                                                              state 1
             User              c2: object             c3: object
Sequence
                    0: event                                                      state 2
 diagram
                                     1: operation           2: operation
   Object-Oriented Software Systems Engineering – Chapter 3                    Slide 18
Use Case

  A use case is a starting point
  You may not know very much about a subject,
   write down what you do know
  Then you need to find out the detail that you do
   not know but that you need to know in order to
   solve the problem
  When we have as much detail as we need, we can
   produce Use Case Descriptions




Object-Oriented Software Systems Engineering – Chapter 3   Slide 19
Use Case Descriptions

 A use case description:
  The text to describe a particular use case
   interaction - in the form of a 2-way dialogue
   between the actor and the system
  Provides the supporting detail for the use case
   diagram - not to be started until the diagram is
   complete/nearly complete
  Also known as Use Case Scripts or Use Case
   Scenarios (beware - the latter has another
   meaning)




Object-Oriented Software Systems Engineering – Chapter 3   Slide 20
What to describe

  Describe the most common/normal form of
   interaction first - the basic course
  Describe possible variations separately - the
   alternative courses
  The script should be in a conversational style:
       actor requests….
       System responds by….
       Actor does…..
       And so on..




Object-Oriented Software Systems Engineering – Chapter 3   Slide 21
Example of a Use Case Description


   In the video rental shop, the interaction between
     Counter Assistant and Rent Video use case may
     be:
  Actor Actions                                System Response
  1. Customer tenders video(s) to be
  rented and membership card
  2. Counter assistant enters member           3. System provides member details and
   no.into system                                status of loans and fines
  4. Assistant enters identification of each
  video to be rented                           5. System accepts ids and gives fee payable
  6. Assistant requests payment, takes
  money and enters payment made                7. System logs payment details




Object-Oriented Software Systems Engineering – Chapter 3                            Slide 22
Guidelines

  Include a series of numbered sections or steps
   which describe noteworthy events and possibly
   related context, constraints and business rules
  Steps may alternate between actor and system, or
   may be a series of consecutive steps taken by
   either of them
  Written from the user’s point of view
  Written in the vocabulary of the user




Object-Oriented Software Systems Engineering – Chapter 3   Slide 23
Conversational Style

  This conversational style script (as if for a theatre
   play) is a good compromise between the
   advantages and disadvantages of other methods:
  It is quick and easy to write (important for
   capturing early, outline information)
  It is quick and easy to read and to understand
  It encourages concise-ness
  It identifies the required sequence of actions
  It highlights causes and effects




Object-Oriented Software Systems Engineering – Chapter 3   Slide 24
Essential Use Cases

  These are used during the feasibility and analysis
   stages of the project
  The aim is to be free of implementation detail to
   show the essence of the business requirements
   (the conceptual model)
  Enables analysts, developers, users and clients to
   understand the scope of the problem and the
   processes required




Object-Oriented Software Systems Engineering – Chapter 3   Slide 25
Real Use Cases

  Now the Essential Use Cases will be used as the
   basis for lateral, creative thinking with the
   opportunity for new ideas on how to create the
   system
  Real Use Cases are used to document the design
   of the project
       how it will work in reality
  For a user interface it may include prototype
   screen shots, print layouts, form layouts, menus
  For a system interface it may include file layouts




Object-Oriented Software Systems Engineering – Chapter 3   Slide 26
Template Sections

 The following sections are normally included:

  Use Case - its identifier/name
  Actors - list of actors involved. Show which one
   initiates the use case
  Overview - short outline description summarising
   the use case
  Type - category of the use case
  Cross References - use case relationships
   (covered later)



Object-Oriented Software Systems Engineering – Chapter 3   Slide 27
Categories of Use Cases

 1. Primary - major common process
    For example: Rent Video
 2. Secondary - minor or rare processes
       For example: Request to supply unstocked New Video
 3. Optional - processes that may or may not be used




Object-Oriented Software Systems Engineering – Chapter 3   Slide 28
Alternative Courses


   Alternative courses can describe alternative
    events to the typical story
   These are the less common, the exceptional or
    error cases
   Place all the alternatives after all the typical
    course of events
   For example:
  7. Customer pays clerk by cash or credit
  Alternative Courses
  7. Customer has unpaid late charges and will not pay them.
     Collect payment or cancel rental transaction

Object-Oriented Software Systems Engineering – Chapter 3   Slide 29
Use Case Descriptions

 Review of use case descriptions:

  Use Case descriptions supply the detail of system
   requirements
  Conversational scripts are used to describe the
   interactions between actors and use cases
  The basic course may be followed by 1 or more
   alternative courses
  Essential Use Cases are used during Analysis,
   Real Use Cases are used during Design



Object-Oriented Software Systems Engineering – Chapter 3   Slide 30
Summary

 In this chapter we have:
  Described use case modelling
  Introduced use cases and actors
  Discussed relationships between use cases
  Introduced use case descriptions




Object-Oriented Software Systems Engineering – Chapter 3   Slide 31

Contenu connexe

Tendances

CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddel
CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddelCHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddel
CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddelmohamed khalaf alla mohamedain
 
Coupling and cohesion
Coupling and cohesionCoupling and cohesion
Coupling and cohesionSutha31
 
SE_Lec 05_System Modelling and Context Model
SE_Lec 05_System Modelling and Context ModelSE_Lec 05_System Modelling and Context Model
SE_Lec 05_System Modelling and Context ModelAmr E. Mohamed
 
Ch5- Software Engineering 9
Ch5- Software Engineering 9Ch5- Software Engineering 9
Ch5- Software Engineering 9Ian Sommerville
 
Design and Implementation in Software Engineering
Design and Implementation in Software EngineeringDesign and Implementation in Software Engineering
Design and Implementation in Software EngineeringKourosh Sajjadi
 
Formal Methods lecture 01
Formal Methods lecture 01Formal Methods lecture 01
Formal Methods lecture 01Sidra Ashraf
 
Software Engineering : Requirement Analysis & Specification
Software Engineering : Requirement Analysis & SpecificationSoftware Engineering : Requirement Analysis & Specification
Software Engineering : Requirement Analysis & SpecificationAjit Nayak
 
Ch8-Software Engineering 9
Ch8-Software Engineering 9Ch8-Software Engineering 9
Ch8-Software Engineering 9Ian Sommerville
 
Quality and productivity factors
Quality and productivity factorsQuality and productivity factors
Quality and productivity factorsNancyBeaulah_R
 
modelingtools
modelingtoolsmodelingtools
modelingtoolslearnt
 
Implementation issues software engineering
Implementation issues software engineeringImplementation issues software engineering
Implementation issues software engineeringrishi ram khanal
 
Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case DiagramAshesh R
 
Software Architecture Design Decisions
Software Architecture Design DecisionsSoftware Architecture Design Decisions
Software Architecture Design DecisionsAfaq Mansoor Khan
 
Architectural Modeling
Architectural ModelingArchitectural Modeling
Architectural ModelingAMITJain879
 

Tendances (20)

CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddel
CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddelCHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddel
CHAPTER 6 REQUIREMENTS MODELING: SCENARIO based Model , Class based moddel
 
Ch7 implementation
Ch7 implementationCh7 implementation
Ch7 implementation
 
Coupling and cohesion
Coupling and cohesionCoupling and cohesion
Coupling and cohesion
 
SE_Lec 05_System Modelling and Context Model
SE_Lec 05_System Modelling and Context ModelSE_Lec 05_System Modelling and Context Model
SE_Lec 05_System Modelling and Context Model
 
Use case diagrams
Use case diagramsUse case diagrams
Use case diagrams
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
Ch5- Software Engineering 9
Ch5- Software Engineering 9Ch5- Software Engineering 9
Ch5- Software Engineering 9
 
Design and Implementation in Software Engineering
Design and Implementation in Software EngineeringDesign and Implementation in Software Engineering
Design and Implementation in Software Engineering
 
PROTOTYPE MODEL
PROTOTYPE MODELPROTOTYPE MODEL
PROTOTYPE MODEL
 
Formal Methods lecture 01
Formal Methods lecture 01Formal Methods lecture 01
Formal Methods lecture 01
 
Software Engineering : Requirement Analysis & Specification
Software Engineering : Requirement Analysis & SpecificationSoftware Engineering : Requirement Analysis & Specification
Software Engineering : Requirement Analysis & Specification
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Ch8-Software Engineering 9
Ch8-Software Engineering 9Ch8-Software Engineering 9
Ch8-Software Engineering 9
 
Quality and productivity factors
Quality and productivity factorsQuality and productivity factors
Quality and productivity factors
 
Ch16 component based software engineering
Ch16 component based software engineeringCh16 component based software engineering
Ch16 component based software engineering
 
modelingtools
modelingtoolsmodelingtools
modelingtools
 
Implementation issues software engineering
Implementation issues software engineeringImplementation issues software engineering
Implementation issues software engineering
 
Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case Diagram
 
Software Architecture Design Decisions
Software Architecture Design DecisionsSoftware Architecture Design Decisions
Software Architecture Design Decisions
 
Architectural Modeling
Architectural ModelingArchitectural Modeling
Architectural Modeling
 

En vedette

Library Management System
Library Management SystemLibrary Management System
Library Management SystemAnit Thapaliya
 
Lecture04- Use Case Diagrams
Lecture04- Use Case DiagramsLecture04- Use Case Diagrams
Lecture04- Use Case Diagramsartgreen
 
Aras and Developing Deployment Use Cases and Requirements
Aras and Developing Deployment Use Cases and RequirementsAras and Developing Deployment Use Cases and Requirements
Aras and Developing Deployment Use Cases and RequirementsAras
 
Lecture-03 Introduction to UML
Lecture-03 Introduction to UMLLecture-03 Introduction to UML
Lecture-03 Introduction to UMLartgreen
 
UML notations used by CommonKADS
UML notations used by CommonKADSUML notations used by CommonKADS
UML notations used by CommonKADSGuus Schreiber
 
OO Development 5 - Analysis
OO Development 5 - AnalysisOO Development 5 - Analysis
OO Development 5 - AnalysisRandy Connolly
 
UML (Unified Modeling Language)
UML (Unified Modeling Language)UML (Unified Modeling Language)
UML (Unified Modeling Language)Nguyen Tuan
 
Unit 3 object analysis-classification
Unit 3 object analysis-classificationUnit 3 object analysis-classification
Unit 3 object analysis-classificationgopal10scs185
 
Itdocu Defense (Adworks Company)
Itdocu Defense (Adworks Company)Itdocu Defense (Adworks Company)
Itdocu Defense (Adworks Company)Francis Guison
 
One Actor & One Session per UseCase
One Actor & One Session per UseCaseOne Actor & One Session per UseCase
One Actor & One Session per UseCasePutcha Narasimham
 
Data Flow Diagram and USe Case Diagram
Data Flow Diagram and USe Case DiagramData Flow Diagram and USe Case Diagram
Data Flow Diagram and USe Case DiagramKumar
 
UseCase is a DIALOG---NOT a PROCESS
UseCase is a DIALOG---NOT a PROCESSUseCase is a DIALOG---NOT a PROCESS
UseCase is a DIALOG---NOT a PROCESSPutcha Narasimham
 
Cost effectiveness and cost efficiency
Cost effectiveness and cost efficiencyCost effectiveness and cost efficiency
Cost effectiveness and cost efficiencyAHMED ZINHOM
 
Training and placement
Training and placementTraining and placement
Training and placementBhavesh Parmar
 
Usecase diagram railway reservation system
Usecase diagram railway reservation systemUsecase diagram railway reservation system
Usecase diagram railway reservation systemmuthumeenakshim
 
Library management
Library managementLibrary management
Library managementakki_hearts
 
Cost effectiveness and cost efficiency
Cost effectiveness and cost efficiencyCost effectiveness and cost efficiency
Cost effectiveness and cost efficiencyNursing Hi Nursing
 

En vedette (20)

Library Management System
Library Management SystemLibrary Management System
Library Management System
 
Lecture04- Use Case Diagrams
Lecture04- Use Case DiagramsLecture04- Use Case Diagrams
Lecture04- Use Case Diagrams
 
Aras and Developing Deployment Use Cases and Requirements
Aras and Developing Deployment Use Cases and RequirementsAras and Developing Deployment Use Cases and Requirements
Aras and Developing Deployment Use Cases and Requirements
 
Lecture-03 Introduction to UML
Lecture-03 Introduction to UMLLecture-03 Introduction to UML
Lecture-03 Introduction to UML
 
Unit 3
Unit 3Unit 3
Unit 3
 
UML notations used by CommonKADS
UML notations used by CommonKADSUML notations used by CommonKADS
UML notations used by CommonKADS
 
OO Development 5 - Analysis
OO Development 5 - AnalysisOO Development 5 - Analysis
OO Development 5 - Analysis
 
UML (Unified Modeling Language)
UML (Unified Modeling Language)UML (Unified Modeling Language)
UML (Unified Modeling Language)
 
Unit 3 object analysis-classification
Unit 3 object analysis-classificationUnit 3 object analysis-classification
Unit 3 object analysis-classification
 
Itdocu Defense (Adworks Company)
Itdocu Defense (Adworks Company)Itdocu Defense (Adworks Company)
Itdocu Defense (Adworks Company)
 
One Actor & One Session per UseCase
One Actor & One Session per UseCaseOne Actor & One Session per UseCase
One Actor & One Session per UseCase
 
Data Flow Diagram and USe Case Diagram
Data Flow Diagram and USe Case DiagramData Flow Diagram and USe Case Diagram
Data Flow Diagram and USe Case Diagram
 
UseCase is a DIALOG---NOT a PROCESS
UseCase is a DIALOG---NOT a PROCESSUseCase is a DIALOG---NOT a PROCESS
UseCase is a DIALOG---NOT a PROCESS
 
Video Rental System
 Video Rental System Video Rental System
Video Rental System
 
Cost effectiveness and cost efficiency
Cost effectiveness and cost efficiencyCost effectiveness and cost efficiency
Cost effectiveness and cost efficiency
 
Training and placement
Training and placementTraining and placement
Training and placement
 
Usecase diagram railway reservation system
Usecase diagram railway reservation systemUsecase diagram railway reservation system
Usecase diagram railway reservation system
 
Library management
Library managementLibrary management
Library management
 
Types of UML diagrams
Types of UML diagramsTypes of UML diagrams
Types of UML diagrams
 
Cost effectiveness and cost efficiency
Cost effectiveness and cost efficiencyCost effectiveness and cost efficiency
Cost effectiveness and cost efficiency
 

Similaire à 3. use cases

Design pattern (week 2)
Design pattern (week 2)Design pattern (week 2)
Design pattern (week 2)stanbridge
 
Object oriented methodologies
Object oriented methodologiesObject oriented methodologies
Object oriented methodologiesnaina-rani
 
software engineering Architecture and design Unit 3.pptx
software engineering Architecture and design Unit 3.pptxsoftware engineering Architecture and design Unit 3.pptx
software engineering Architecture and design Unit 3.pptxSomnathMule5
 
Sa 008 architecture_views
Sa 008 architecture_viewsSa 008 architecture_views
Sa 008 architecture_viewsFrank Gielen
 
Object oriented sad-5 part ii
Object oriented sad-5 part iiObject oriented sad-5 part ii
Object oriented sad-5 part iiBisrat Girma
 
An Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence DiagramsAn Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence DiagramsMohammed Misbhauddin
 
4+1view architecture
4+1view architecture4+1view architecture
4+1view architecturedrewz lin
 
4+1view architecture
4+1view architecture4+1view architecture
4+1view architectureTot Bob
 
Application scenarios in streaming oriented embedded-system design
Application scenarios in streaming oriented embedded-system designApplication scenarios in streaming oriented embedded-system design
Application scenarios in streaming oriented embedded-system designMr. Chanuwan
 
Lecture 17 design concepts (2)
Lecture 17   design concepts (2)Lecture 17   design concepts (2)
Lecture 17 design concepts (2)IIUI
 
Online eaxmination
Online eaxminationOnline eaxmination
Online eaxminationAditi_17
 

Similaire à 3. use cases (20)

Chapter5
Chapter5Chapter5
Chapter5
 
Design pattern (week 2)
Design pattern (week 2)Design pattern (week 2)
Design pattern (week 2)
 
Finald
FinaldFinald
Finald
 
Uml3
Uml3Uml3
Uml3
 
Object oriented methodologies
Object oriented methodologiesObject oriented methodologies
Object oriented methodologies
 
I0935053
I0935053I0935053
I0935053
 
Unit 1
Unit 1Unit 1
Unit 1
 
software engineering Architecture and design Unit 3.pptx
software engineering Architecture and design Unit 3.pptxsoftware engineering Architecture and design Unit 3.pptx
software engineering Architecture and design Unit 3.pptx
 
Sa 008 architecture_views
Sa 008 architecture_viewsSa 008 architecture_views
Sa 008 architecture_views
 
Struts Ppt 1
Struts Ppt 1Struts Ppt 1
Struts Ppt 1
 
Object oriented sad-5 part ii
Object oriented sad-5 part iiObject oriented sad-5 part ii
Object oriented sad-5 part ii
 
An Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence DiagramsAn Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence Diagrams
 
4+1view architecture
4+1view architecture4+1view architecture
4+1view architecture
 
4+1view architecture
4+1view architecture4+1view architecture
4+1view architecture
 
Intoduction to uml
Intoduction to umlIntoduction to uml
Intoduction to uml
 
02 use cases
02 use cases02 use cases
02 use cases
 
Application scenarios in streaming oriented embedded-system design
Application scenarios in streaming oriented embedded-system designApplication scenarios in streaming oriented embedded-system design
Application scenarios in streaming oriented embedded-system design
 
Lecture 17 design concepts (2)
Lecture 17   design concepts (2)Lecture 17   design concepts (2)
Lecture 17 design concepts (2)
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
Online eaxmination
Online eaxminationOnline eaxmination
Online eaxmination
 

Plus de APU

01 introduction to_module
01 introduction to_module01 introduction to_module
01 introduction to_moduleAPU
 
. 1. introduction to object orientation
. 1. introduction to object orientation. 1. introduction to object orientation
. 1. introduction to object orientationAPU
 
. 01 introduction_to_module
. 01 introduction_to_module. 01 introduction_to_module
. 01 introduction_to_moduleAPU
 
9. oo languages
9. oo languages9. oo languages
9. oo languagesAPU
 
8. design patterns
8. design patterns8. design patterns
8. design patternsAPU
 
7. sequence and collaboration diagrams
7. sequence and collaboration diagrams7. sequence and collaboration diagrams
7. sequence and collaboration diagramsAPU
 
6. activity diagrams
6. activity diagrams6. activity diagrams
6. activity diagramsAPU
 
5. state diagrams
5. state diagrams5. state diagrams
5. state diagramsAPU
 
4. class diagrams using uml
4. class diagrams using uml4. class diagrams using uml
4. class diagrams using umlAPU
 
01 introduction to_module
01 introduction to_module01 introduction to_module
01 introduction to_moduleAPU
 
. 9. oo languages
. 9. oo languages. 9. oo languages
. 9. oo languagesAPU
 
08 aggregation and collection classes
08  aggregation and collection classes08  aggregation and collection classes
08 aggregation and collection classesAPU
 
. 8. design patterns
. 8. design patterns. 8. design patterns
. 8. design patternsAPU
 
. 5. state diagrams
. 5. state diagrams. 5. state diagrams
. 5. state diagramsAPU
 
. 4. class diagrams using uml
. 4. class diagrams using uml. 4. class diagrams using uml
. 4. class diagrams using umlAPU
 
. 2. introduction to uml
. 2. introduction to uml. 2. introduction to uml
. 2. introduction to umlAPU
 
. 01 introduction_to_module
. 01 introduction_to_module. 01 introduction_to_module
. 01 introduction_to_moduleAPU
 
14 file handling
14 file handling14 file handling
14 file handlingAPU
 
13 gui development
13 gui development13 gui development
13 gui developmentAPU
 
10 exceptionsin java
10 exceptionsin java10 exceptionsin java
10 exceptionsin javaAPU
 

Plus de APU (20)

01 introduction to_module
01 introduction to_module01 introduction to_module
01 introduction to_module
 
. 1. introduction to object orientation
. 1. introduction to object orientation. 1. introduction to object orientation
. 1. introduction to object orientation
 
. 01 introduction_to_module
. 01 introduction_to_module. 01 introduction_to_module
. 01 introduction_to_module
 
9. oo languages
9. oo languages9. oo languages
9. oo languages
 
8. design patterns
8. design patterns8. design patterns
8. design patterns
 
7. sequence and collaboration diagrams
7. sequence and collaboration diagrams7. sequence and collaboration diagrams
7. sequence and collaboration diagrams
 
6. activity diagrams
6. activity diagrams6. activity diagrams
6. activity diagrams
 
5. state diagrams
5. state diagrams5. state diagrams
5. state diagrams
 
4. class diagrams using uml
4. class diagrams using uml4. class diagrams using uml
4. class diagrams using uml
 
01 introduction to_module
01 introduction to_module01 introduction to_module
01 introduction to_module
 
. 9. oo languages
. 9. oo languages. 9. oo languages
. 9. oo languages
 
08 aggregation and collection classes
08  aggregation and collection classes08  aggregation and collection classes
08 aggregation and collection classes
 
. 8. design patterns
. 8. design patterns. 8. design patterns
. 8. design patterns
 
. 5. state diagrams
. 5. state diagrams. 5. state diagrams
. 5. state diagrams
 
. 4. class diagrams using uml
. 4. class diagrams using uml. 4. class diagrams using uml
. 4. class diagrams using uml
 
. 2. introduction to uml
. 2. introduction to uml. 2. introduction to uml
. 2. introduction to uml
 
. 01 introduction_to_module
. 01 introduction_to_module. 01 introduction_to_module
. 01 introduction_to_module
 
14 file handling
14 file handling14 file handling
14 file handling
 
13 gui development
13 gui development13 gui development
13 gui development
 
10 exceptionsin java
10 exceptionsin java10 exceptionsin java
10 exceptionsin java
 

3. use cases

  • 1. Use Cases Chapter 3 Object-Oriented Software Systems Engineering – Chapter 3 Slide 1
  • 2. Objectives In this chapter we will:  Describe use case modelling  Introduce use cases and actors  Discuss relationships between use cases  Introduce use case descriptions Object-Oriented Software Systems Engineering – Chapter 3 Slide 2
  • 3. Use Case Modelling  The purpose of use case modelling to decide and describe the functional requirements of the system to give clear and consistent description of what the system should do to provide a basis for performing tests that verify the system to provide the ability to trace functional requirements into classes and operations  Use case model represents use-case view is described by a use-case diagram Object-Oriented Software Systems Engineering – Chapter 3 Slide 3
  • 4. Use Case Modelling Use Cases are described using both text documents and diagrams Use-case modelling is primarily an act of writing text NOT just drawing diagrams Object-Oriented Software Systems Engineering – Chapter 3 Slide 4
  • 5. Use Case Modelling  Definition of use case  represents a complete functionality as perceived by an actor  a set of sequences of actions a system performs that yield an observable result of value to a particular actor  Characteristics  is always initiated by an actor  provides tangible value to an actor (observable not necessary salient)  is complete - use case is not complete until an end value is produced even if several communications occur along the way  Scenario’s are instances of use-cases  A specific sequence of actions that illustrate behaviour  You’ll find primary scenarios and secondary scenarios Object-Oriented Software Systems Engineering – Chapter 3 Slide 5
  • 6. Use Case Modelling – terms & concepts Name of System An Actor A Use Case Object-Oriented Software Systems Engineering – Chapter 3 Slide 6
  • 7. Use Case Modelling – terms & concepts  The system boundary  defines responsibility  black box that provides use-cases  within the system boundary  what the system does but not how the system does  Use-cases  a description of a set of sequence of actions, including variants that the system performs to yield an observable value to an actor  a set of scenarios Object-Oriented Software Systems Engineering – Chapter 3 Slide 7
  • 8. Use Case Modelling – terms & concepts  Actor  representing a role that someone might play, rather than a particular individual  external entity that has interest in interacting with the system  Interaction  a communication relation between an actor and a use case Object-Oriented Software Systems Engineering – Chapter 3 Slide 8
  • 9. Identifying Use Cases and Actors  What functions does the actor require from the system?  Does the actor need to read, create, destroy, modify or store some kind of data in the system?  Does the actor have to be notified about events in the system, or does the actor need to confirm with the system for something?  Could the actor’s daily work be simplified or made more efficient via new functions in the system?  What input/output does the system need?  Can these requirements be handled by one actor or someone else as well? Object-Oriented Software Systems Engineering – Chapter 3 Slide 9
  • 10. Use Case Modelling – organising use cases Communication Association UML use-case diagram An Actor A Use Case Communication associations: UseCase 1 connect actors to use cases User 1 UseCase 2 Manager UseCase 3 User 2 Object-Oriented Software Systems Engineering – Chapter 3 Slide 10
  • 11. Use Case Modelling – types of relationships Relationships between actors generalization - specialization Library User Student Lecturer Object-Oriented Software Systems Engineering – Chapter 3 Slide 11
  • 12. Use Case Modelling – types of relationships Two stereotypes of dependency relationship in use cases Include Extends specifies that the source use case specifies that the target use case (A) explicitly incorporates the (B) extends the behaviour of the behaviour of the target (B) source (A) A includes the behaviour of B A is extended from B by adding some actions <<include>> <<extends>> Extension points A B A B Object-Oriented Software Systems Engineering – Chapter 3 Slide 12
  • 13. Use Case Relationships Extend and Uses relationship - different forms of re-use  Extend relationship - accounts for optional behaviour  Include relationship -uses or include relationship  one use case uses another use case  (reuse by composition) <<extends>> Place rush (set priority) order Check password Place order <<uses>> Extension points set priority Vaildate user Retinal scan Object-Oriented Software Systems Engineering – Chapter 3 Slide 13
  • 14. part 1 A Simple Use Case Diagram of Library Library System Search for Update book catalog Library Member <<extend>> Borrow a over limit Refuse copy of book Librarian loan Reserve a book Return a e>> copy of book <<includ > d e> in clu Member of << Staff Extend loan Object-Oriented Software Systems Engineering – Chapter 3 Slide 14
  • 15. Use Case Diagram - order processing Place order Customer <<extend>> discount extension points <<i set discount ncl << ude >> inc << Give product lud nci information e> lu Customer > de Cancel order <<i >> ncl ude >> << Update in cl account Return ud Inventory product e> system <<i > nclu de> > Update product quantities Get status on order Accounting Sales Rep system Run sales report Object-Oriented Software Systems Engineering – Chapter 3 Slide 15
  • 16. Use Case Diagram - course management Course Management System Select Register for courses to courses teach Student Request Lecturer course roster Billing system Create course Maintain catalogue course’s infor. Maintain Maintain information lecturer’s infor. Registrar Maintain student’s infor Object-Oriented Software Systems Engineering – Chapter 3 Slide 16
  • 17. UseCase 1 Use Case Actor 1 diagram UseCase 2 Manager Actor 2 UseCase 3 Class 2 Class 1 Class State diagram diagram Class 3 Class 4 <<Actor>> state 1 User c2: object c3: object Sequence 0: event state 2 diagram 1: operation 2: operation Object-Oriented Software Systems Engineering – Chapter 3 Slide 17
  • 18. UseCase 1 Actor 1 Use Case UseCase 2 diagram Manager Actor 2 UseCase 3 Class 2 Class 1 Class diagram State Class 3 Class 4 diagram <<Actor>> state 1 User c2: object c3: object Sequence 0: event state 2 diagram 1: operation 2: operation Object-Oriented Software Systems Engineering – Chapter 3 Slide 18
  • 19. Use Case  A use case is a starting point  You may not know very much about a subject, write down what you do know  Then you need to find out the detail that you do not know but that you need to know in order to solve the problem  When we have as much detail as we need, we can produce Use Case Descriptions Object-Oriented Software Systems Engineering – Chapter 3 Slide 19
  • 20. Use Case Descriptions A use case description:  The text to describe a particular use case interaction - in the form of a 2-way dialogue between the actor and the system  Provides the supporting detail for the use case diagram - not to be started until the diagram is complete/nearly complete  Also known as Use Case Scripts or Use Case Scenarios (beware - the latter has another meaning) Object-Oriented Software Systems Engineering – Chapter 3 Slide 20
  • 21. What to describe  Describe the most common/normal form of interaction first - the basic course  Describe possible variations separately - the alternative courses  The script should be in a conversational style:  actor requests….  System responds by….  Actor does…..  And so on.. Object-Oriented Software Systems Engineering – Chapter 3 Slide 21
  • 22. Example of a Use Case Description  In the video rental shop, the interaction between Counter Assistant and Rent Video use case may be: Actor Actions System Response 1. Customer tenders video(s) to be rented and membership card 2. Counter assistant enters member 3. System provides member details and no.into system status of loans and fines 4. Assistant enters identification of each video to be rented 5. System accepts ids and gives fee payable 6. Assistant requests payment, takes money and enters payment made 7. System logs payment details Object-Oriented Software Systems Engineering – Chapter 3 Slide 22
  • 23. Guidelines  Include a series of numbered sections or steps which describe noteworthy events and possibly related context, constraints and business rules  Steps may alternate between actor and system, or may be a series of consecutive steps taken by either of them  Written from the user’s point of view  Written in the vocabulary of the user Object-Oriented Software Systems Engineering – Chapter 3 Slide 23
  • 24. Conversational Style  This conversational style script (as if for a theatre play) is a good compromise between the advantages and disadvantages of other methods:  It is quick and easy to write (important for capturing early, outline information)  It is quick and easy to read and to understand  It encourages concise-ness  It identifies the required sequence of actions  It highlights causes and effects Object-Oriented Software Systems Engineering – Chapter 3 Slide 24
  • 25. Essential Use Cases  These are used during the feasibility and analysis stages of the project  The aim is to be free of implementation detail to show the essence of the business requirements (the conceptual model)  Enables analysts, developers, users and clients to understand the scope of the problem and the processes required Object-Oriented Software Systems Engineering – Chapter 3 Slide 25
  • 26. Real Use Cases  Now the Essential Use Cases will be used as the basis for lateral, creative thinking with the opportunity for new ideas on how to create the system  Real Use Cases are used to document the design of the project  how it will work in reality  For a user interface it may include prototype screen shots, print layouts, form layouts, menus  For a system interface it may include file layouts Object-Oriented Software Systems Engineering – Chapter 3 Slide 26
  • 27. Template Sections The following sections are normally included:  Use Case - its identifier/name  Actors - list of actors involved. Show which one initiates the use case  Overview - short outline description summarising the use case  Type - category of the use case  Cross References - use case relationships (covered later) Object-Oriented Software Systems Engineering – Chapter 3 Slide 27
  • 28. Categories of Use Cases 1. Primary - major common process For example: Rent Video 2. Secondary - minor or rare processes For example: Request to supply unstocked New Video 3. Optional - processes that may or may not be used Object-Oriented Software Systems Engineering – Chapter 3 Slide 28
  • 29. Alternative Courses  Alternative courses can describe alternative events to the typical story  These are the less common, the exceptional or error cases  Place all the alternatives after all the typical course of events  For example: 7. Customer pays clerk by cash or credit Alternative Courses 7. Customer has unpaid late charges and will not pay them. Collect payment or cancel rental transaction Object-Oriented Software Systems Engineering – Chapter 3 Slide 29
  • 30. Use Case Descriptions Review of use case descriptions:  Use Case descriptions supply the detail of system requirements  Conversational scripts are used to describe the interactions between actors and use cases  The basic course may be followed by 1 or more alternative courses  Essential Use Cases are used during Analysis, Real Use Cases are used during Design Object-Oriented Software Systems Engineering – Chapter 3 Slide 30
  • 31. Summary In this chapter we have:  Described use case modelling  Introduced use cases and actors  Discussed relationships between use cases  Introduced use case descriptions Object-Oriented Software Systems Engineering – Chapter 3 Slide 31

Notes de l'éditeur

  1. 1
  2. A use case captures some user visible function A use case may be small or large A use case acheives a discrete goal for the user Techniques: Identifying use cases Based on the system scope model, we think of our system as a black box which Responds to envents ocurring along a chain of activities, representing a typical system cycle producing some response. We treat each use case as a self contained unit of interaction. It must be performed a single actor ina single place although it might result in output flows to other passive actors. The use case must also leave the system in a stable state; this may result in a some measurable value to it’s user.
  3. The uses(include) occurs when you have a chunk of behaviour that is similar across more than one use case. Included use cases never stands alone- an example of delegation Use extend when you want to have one use case that is similar to antother use case but does a bit more-may extend to model optional behaviour – base use case may stand alone but under certain conditions e.g. plac an order might read: main flow of events: include (Validate user(set priority) – an extension point Similiarities imply factoring out common code Differeneces: in the case of extends actors have a relationship to the use case that is extended. It is assumed that a given actor willperform both the base use case and all of the extensions Different designers make use of use cases with varying degrees of granularity As uou perform modelling tasks you will come up with models that express how to do you use cases, there is more than one way these are called realisations.