Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSE360 Lecture 13

CSE360 Lecture 13

Introduction to Software Engineering
Behavior Modeling
(201805)

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. CSE360
    Introduction to Software Engineering
    Lecture 13:
    Behavior Modeling
    Javier Gonzalez-Sanchez
    [email protected]
    javiergs.engineering.asu.edu
    Office Hours: By appointment

    View full-size slide

  2. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 2
    Previously
    SRS
    (requirements)
    Use Case Diagram
    (functional structure)
    UC1
    UC2
    UC4
    UC3
    (non-functional)
    Use Case Template
    (functional details)

    View full-size slide

  3. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 3
    Previously
    Use Case Template

    View full-size slide

  4. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 4
    Introducing UML

    View full-size slide

  5. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 5
    Activities and States
    • Create a activity diagram when a use-case requires
    a graphical representation of the flow of interaction.
    • Create a state diagram when a use-case requires a
    list of the different states of a system.
    * they are not mandatory and they can be combined.

    View full-size slide

  6. Activity Diagram

    View full-size slide

  7. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 7
    Test Yourselves
    • What is an activity?
    • What is the difference between activity and
    requirement?

    View full-size slide

  8. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 8
    Activity Diagram
    • A graphical representation of the flow of activities
    1. Sequence
    2. Conditions and Loops
    3. Parallel or Concurrent
    4. Actor (if there are multiple actors involved in a
    specific use-case) responsibility for the action
    described

    View full-size slide

  9. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 9
    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 full-size slide

  10. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 10
    Example | Use Case

    View full-size slide

  11. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 11
    Example 2
    ATM
    transaction

    View full-size slide

  12. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 12
    Example 3 (part 1/2)
    ATM
    transaction
    customer
    bank
    ATM machine

    View full-size slide

  13. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 13
    Example 3 (part 1\2/2)

    View full-size slide

  14. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 14
    Example | Astah

    View full-size slide

  15. State Diagram

    View full-size slide

  16. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 16
    State Diagram
    State machine models show
    • states (as nodes) – a set of observable
    circumstances that characterizes the behavior of a
    system at a given time
    • Event (arc between nodes) —an occurrence that
    causes the system to exhibit some predictable form
    of behavior
    When an event occurs, the system moves from one
    state to another.

    View full-size slide

  17. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 17
    Example: MyASU

    View full-size slide

  18. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 18
    Example State machine diagram

    View full-size slide

  19. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 19
    Example State machine diagram

    View full-size slide

  20. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 20
    Test Yourselves
    • Requirement
    • Use case
    • Use case diagram
    • Use case document
    • Actor
    • Scenario
    • Activity
    • State

    View full-size slide

  21. Pac-Man Video Game
    Case Study

    View full-size slide

  22. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 22
    Pac-Man
    • View Maze
    • View Characters
    • View Score
    • Move
    • Wall collision
    • Eat a dot
    • Eat power-up dot
    • Eat ghost
    • Pac-man dies

    View full-size slide

  23. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 23
    Pac-Man
    • http://gameinternals.com/post/2072558330/
    understanding-pac-man-ghost-behavior

    View full-size slide

  24. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 24
    Pac-Man
    What about:
    • New
    • Hunter
    • Hunted
    • Eaten

    View full-size slide

  25. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 25
    Pac-Man

    View full-size slide

  26. Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 26
    Homework
    • Review the Monopoly Requirements Specification
    • Review the Pac-Man Requirements Specification
    • Review the Course Registration System Specification
    * Documents available on Blackboard.

    View full-size slide

  27. CSE360 – Introduction to Software Engineering
    Javier Gonzalez-Sanchez
    [email protected]
    Summer 2017
    Disclaimer. These slides can only be used as study material for the class CSE360 at ASU. They cannot be distributed or used for another purpose.

    View full-size slide