$30 off During Our Annual Pro Sale. View Details »

CSE563 Lecture 13

CSE563 Lecture 13

Software Requirements and Specification
Activity Diagram
(202202)

Javier Gonzalez-Sanchez
PRO

August 28, 2021
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. jgs
    CSE 563
    Software Requirements and Specification
    Lecture 13: Activity Diagram
    Dr. Javier Gonzalez-Sanchez
    [email protected]
    javiergs.engineering.asu.edu | javiergs.com
    PERALTA 230U
    Office Hours: By appointment

    View Slide

  2. jgs
    Next Step
    Where can I put the details ?

    View Slide

  3. jgs
    Spring 2022 | 00001101
    Use Case Template
    Number and
    Name
    < the name is the goal as a short active verb phrase>
    Goal / Description < a longer statement of the goal in context if needed >
    Pre-conditions
    Success End
    Condition

    Failed End
    Condition

    Actors

    Trigger
    Description step action
    1 from trigger to goal delivery, and any cleanup after>
    2 <...>
    3

    View Slide

  4. jgs
    Spring 2022 | 00001101
    Number and
    Name
    < the name is the goal as a short active verb phrase>
    Goal / Description < a longer statement of the goal in context if needed >
    Pre-conditions
    Success End
    Condition

    Failed End
    Condition

    Actors

    Trigger
    Description step action
    1 from trigger to goal delivery, and any cleanup after>
    2 <...>
    3
    Use Case Template

    View Slide

  5. jgs
    Examples
    Use Case Template

    View Slide

  6. jgs
    Spring 2022 | 00001101
    Example
    Number
    Name
    Goal/
    Description
    Pre-conditions
    Success End
    Condition
    Failed End
    Condition
    Actors
    Trigger
    Description

    View Slide

  7. jgs
    Spring 2022 | 00001101
    Example
    Number
    Name
    Goal/
    Description
    Pre-conditions
    Success End
    Condition
    Failed End
    Condition
    Actors
    Trigger
    Description

    View Slide

  8. jgs
    Spring 2022 | 00001101
    Example: insulin pump
    Insulin Pump/Control Software/SRS/3.3.2
    Function Compute insulin dose: safe sugar level.
    Description
    Computes the dose of insulin to be delivered when the current
    measured sugar level is in the safe zone between 3 and 7 units.
    Inputs Current sugar reading (r2); the previous two readings (r0
    and r1).
    Source Current sugar reading from sensor. Other readings
    from memory.
    Outputs CompDose—the dose in insulin to be delivered.
    Destination Main control loop.
    Action
    CompDose is zero if the sugar level is stable or falling or if the
    level is increasing but the rate of increase is decreasing. If the
    level is increasing and the rate of increase is increasing, then
    CompDose is computed by dividing the difference between the
    current sugar level and the previous level by 4 and rounding the
    result. If the result, is rounded to zero then CompDose is set to
    the minimum dose that can be delivered.
    Requirements
    Two previous readings so that the rate of change of sugar level
    can be computed.
    Pre-condition
    The insulin reservoir contains at least the maximum allowed
    single dose of insulin.
    Post-condition r0 is replaced by r1 then r1 is replaced by r2.
    Side effects None.
    Number
    Name
    Goal/
    Description
    Pre-conditions
    Success End
    Condition
    Failed End
    Condition
    Actors
    Trigger
    Description

    View Slide

  9. jgs
    Behavior Modeling

    View Slide

  10. jgs
    Spring 2022 | 00001101
    Introducing UML

    View Slide

  11. jgs
    Spring 2022 | 00001101
    Astah

    View Slide

  12. jgs
    Spring 2022 | 00001101
    Behavioral Modeling
    Supplements the use case by providing
    § a graphical representation of the flow of interaction. Create an activity
    diagram for each use-case.
    § a list of the different states of a system. Build a state diagram for the
    system.
    They are not mandatory, and they can be combined.

    View Slide

  13. jgs
    Activity Diagram

    View Slide

  14. jgs
    Spring 2022 | 00001101
    Activity Diagram
    § Supplements the use case by providing a graphical representation of
    § the flow of activities
    § the sequence from one activity to another.
    § the parallel, branched and concurrent activities
    § indicate which actor (if there are multiple actors involved in a specific use-
    case) has responsibility for the action described

    View Slide

  15. jgs
    Spring 2022 | 00001101
    Key elements
    § rounded rectangles represent actions;
    § diamonds represent decisions;
    § bars represent the start (split) or end (join) of concurrent activities;
    § a black circle represents the start (initial node) of the workflow;
    § an encircled black circle represents the end (final node).
    § Arrows run from the start towards the end and represent the order in which
    activities happen.
    § Swim lane or functional band helps to visually distinguishes job sharing
    and responsibilities

    View Slide

  16. jgs
    Spring 2022 | 00001101
    Use Case

    View Slide

  17. jgs
    Spring 2022 | 00001101
    Example 1
    Note:
    Astah will ask you for the Decision and Merge

    View Slide

  18. jgs
    Spring 2022 | 00001101
    Example 2 (Astah version)

    View Slide

  19. jgs
    Spring 2022 | 00001101
    Example 3

    View Slide

  20. jgs
    Pac-Man Video Game
    Case Study

    View Slide

  21. jgs
    Spring 2022 | 00001101
    Pac-Man
    http://gameinternals.com/post/2072558330/
    understanding-pac-man-ghost-behavior

    View Slide

  22. jgs
    Spring 2022 | 00001101
    The Red Ghost (Blinky)

    View Slide

  23. jgs
    Spring 2022 | 00001101
    Questions

    View Slide

  24. jgs
    CSE 563 Software Requirements and Specification
    Javier Gonzalez-Sanchez, Ph.D.
    [email protected]
    Fall 2021
    Copyright. These slides can only be used as study material for the class CSE563 at ASU.
    They cannot be distributed or used for another purpose.

    View Slide