Topics -- Use Cases, Iterative Development, Conceptual Model
 
Use Case A textual description of user interaction with a system process 
 
  • Use cases provide value to an actor 
  • Use cases are complete 
  • Scenario A specific instance of a use case
    Actor External agent that interacts with the system 
    Requirements specification Document describing the functions & attributes of a software system


    Answer these important questions
     

    Three significant features of an Object Oriented Analysis & Design Approach
     
     Problem analysis -- Brainstorming

    for

    Difficulties during problem analysis

    Use Cases can help

    Methods of identifying Use Cases
     
    Source Activity
    Documents Review requirement specifications 
    Domain Experts Interview Experts
    Actors Identify the processes they use
    Events the domain responds to Identify the actors and corresponding use cases


    Finding Actors for a system

          Identify who

          Identify what

    Finding Use Cases for a system

    For each actor identified, determine


    Finding Use Cases for a system where events may not be obviously related to actors,

    Use Case Type -- Real

    Describes a process in terms of

     
    Typical Course of Events: ATM Withdraw Cash (Real Description)
    Actor Actions: System Response:
    1) The Customer inserts their card 2) Prompts for PIN
    3) Enters PIN on keypad 4) Displays options menu
     
    Typical Course of Events: Item Checkout (Real Description)
    Actor Actions: System Response:
    1) For each item, the Cashier types in the UPC in the UPC input field of Window1. Then press the "Enter Item" button with the mouse or press the <Enter> Key. 2) Displays the item price and adds the item information to the running sales transaction. 

    The description and price of the current item are displayed in Textbox 2 of Window1.



    Real descriptions during the analysis phase restrict creative solutions.

    Create real use cases during the design phase.



    Use Case Type -- Essential

    Describes a process abstractly in terms of its

     
    Typical Course of Events: ATM Withdraw Cash (Essential Description)
    Actor Actions: System Response:
    1) The Customer identifies themselves 2) Presents options
     
    Typical Course of Events: Item Checkout (Essential Description)
    Actor Actions: System Response:
    1) The Cashier records the identifier from each item 

    If there is more than one of the same item, the Cashier can enter the quantity as well

    2) Determines the item price and adds the item information to the running sales transaction.  

    The description and price of the current item are presented.



    The typical course of events The alternative courses of events  

     
    Alternative Sequences -- Buy Items with Cash
    Line Number Cause Response
    Line 2 Invalid identifier entered Indicate error
    Line 7 Customer didn't have enough cash. Cancel Sales transaction.


    Also likely alternatives -- branching
     
    Typical Course of Events: Buy Items
    Actor Actions: System Response:
    1) (steps skipped ...)  
    2) Customer chooses payment type, if payment type is 
    1. Cash, see Pay by Cash section 
    2. Credit, see pay by Credit section 
    3. Check, see pay by Check section 
     
      3) Logs the completed sale 

    4) Prints a receipt

     
     
     
    Section: Pay By Cash
    Typical Course of Events  
    Actor Actions: System Response:
    1) The Customer gives a cash payment -- the "cash tendered" -- possibly greater than the sale total.  
    2)  The Cashier records the cash tendered 3)  Shows the balance due the Customer
    4)  The Cashier deposits the cash received and extracts the balance owning to give to the Customer.  


    Relating Use Cases -- Include Relationships (Also known as uses relationships)

    a use case is incomplete and will not work unless it includes or uses the behavior of another use case (dependency relationship).

    The <<include>> use case

    A stereotype can be used to give extra information about a model element on a diagram.
     
    Typical Course of Events: Buy Items (Text example of Uses/includes)
    Actor Actions: System Response:
    1) (steps skipped ...)    
    2) Customer chooses payment type, if payment type is 
    1. Cash, initiate Pay by Cash 
    2. Credit, initiate Pay by Credit 
    3. Check, initiate Pay by Check 
       


    Relating Use Cases -- Extend Relationships (variations on the typical course)
      The <<extend>> use case  
    Typical Course of Events: Buy Items (Text example of Uses/includes)
    Actor Actions: System Response:
    1) (steps skipped ...)  
    12) (delivery address option) The Customer leaves with the items purchased.  


    Relating Use Cases -- Open Modeling Language Concepts
     

    Use Case Relationships (UML Version 1.1)
     

     


    Use Case Relationships (UML Version 1.3)

     



    Showing Relationships in UML
     

    Generalization Relationships
     

    Setting Priorities -- Rank Order Use cases
       
    Use Case a b c d e f Sum
    Buy Items 5 3 2 0 5 3 18
    Add New Users 3 3 2 0 2 2 12
    Start Up 3 2 2 0 2 2 11


    It is also possible to do simpler classifications -- high, medium, low
     
    Rank Use Case Justification
    High Buy Items Scores on most increased ranking criteria.
    Medium Add New Users 

    Log In 

    Refund Items

    Affects security subdomain 

    Affects security subdomain 

    Important process; affects accounting

    Low Cash Out 

    Start Up 

    Shut Down

    Minimal effect on architecture 

    Definition is dependent on other use cases 

    Minimal effect on architecture.



    Use case versions for development cycles

     
    Use Case:  Buy Items (L) pp. 67-68
    Simplify & Constrain the Typical Course of Events: 
    Actor Actions: System Response:
    1) This Use case starts when a Customer arrives at POST with items to purchase.  
    2) The Cashier records each item. 

    If there is more than one of an item, the Cashier can enter the quantity as well

    3) Determines the item price and adds the item information to the running sales transaction. 

    Show description and price of the current item

    4) On completion of item entry, the Cashier indicates to the POST that item entry is complete. 5) Calculates and presents the sale total.
    6) The Cashier tells the customer the total  
    7) The Customer chooses payment type: 
    • If cash, see Pay by Cash 
    • If credit, see Pay by Credit 
    • If check, see Pay by Check 
    8) Logs the completed sale 

     9) Updates inventory levels 

    10) Generates a receipt

    11) The Cashier gives the receipt to the Customer  
    12) The Customer leaves with the items purchased.  


    Analysis and Preliminary Design
     

    Build a conceptual model containing the classes that accurately represent real abstractions of the problem domain.
     

    Best sources of classes

    Conceptual Model
     In general

    Concept
     

    Total conceptual model (Ideal?)
      Minimal conceptual model (Practical?)
     

    Strategies for finding domain concepts

    How to make a conceptual model
      Mapmaker strategy

    Specification objects

            How to knowledgeably buy an object that has not been seen?
            Need specifications -- a description of the object .



    Assignment (10 points)         (Use function list based on Craig Larman's format).