Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

jgs Next Step Where can I put the details ?

Slide 3

Slide 3 text

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 2 <...> 3

Slide 4

Slide 4 text

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 2 <...> 3 Use Case Template

Slide 5

Slide 5 text

jgs Examples Use Case Template

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

jgs Behavior Modeling

Slide 10

Slide 10 text

jgs Spring 2022 | 00001101 Introducing UML

Slide 11

Slide 11 text

jgs Spring 2022 | 00001101 Astah

Slide 12

Slide 12 text

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.

Slide 13

Slide 13 text

jgs Activity Diagram

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

jgs Spring 2022 | 00001101 Use Case

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

jgs Spring 2022 | 00001101 Example 2 (Astah version)

Slide 19

Slide 19 text

jgs Spring 2022 | 00001101 Example 3

Slide 20

Slide 20 text

jgs Pac-Man Video Game Case Study

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

jgs Spring 2022 | 00001101 The Red Ghost (Blinky)

Slide 23

Slide 23 text

jgs Spring 2022 | 00001101 Questions

Slide 24

Slide 24 text

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.