Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

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)

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

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.

Slide 6

Slide 6 text

Activity Diagram

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

State Diagram

Slide 16

Slide 16 text

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.

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

Pac-Man Video Game Case Study

Slide 22

Slide 22 text

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

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

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.

Slide 27

Slide 27 text

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.