Top Banner
Slide 1 Chapter 8 Behavioral Modeling
26

Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Dec 22, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 1

Chapter 8Behavioral Modeling

Page 2: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 2

Key Ideas

Behavioral models describe the internal dynamic aspects of an information system that supports business processes in an organizationKey UML behavioral models are: sequence diagrams, collaboration diagrams, and statechart diagrams

Page 3: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 3

Objectives■ Understand the rules and style guidelines

for sequence and communication diagrams and behavioral state machines.

■ Understand the processes used to create sequence and communication diagrams and behavioral state machines.

■ Be able to create sequence and communication diagrams and behavioral state machines.

■ Understand the relationship between the behavioral models and the structural and functional models.

Page 4: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 4

BEHAVIORAL MODELS

Page 5: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 5

Purpose of Behavioral Models

Show how objects colaborate to support each use case in the structural modelDepict the internal view of the business processTo show the effects of varied processes on the system

Page 6: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 6

Interaction Diagram Components

ObjectsInstantiation of a classHas attributes that describe an object

OperationsSend and receive messages

MessagesTell object to execute a behavior

Page 7: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 7

Sequence Diagrams

Illustrate the objects that participate in a use-caseShow the messages that pass between objects for a particular use-case

Page 8: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 8

Sequence Diagram Example

Page 9: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 9

Sequence Diagram SyntaxAN ACTOR

AN OBJECT

A LIFELINE

A FOCUS OF CONTROL

A MESSAGE

OBJECT DESTRUCTION

anObject:aClass

aMessage()

x

Page 10: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 10

Building a Sequence Diagram

1. Determine the context of the sequence diagram

2. Identify the participating objects3. Set the lifeline for each object4. Add messages5. Place the focus of control on each

object’s lifeline6. Validate the sequence diagram

Page 11: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 11

Normal Flow of Events:

1. Customer submits a search request to the system.2. The system provides the customer a list of recommended CDs.3. The customer chooses one of the CDs to find additional information.4. The system provides the customer with basic information & CD Reviews5. The customer calls the maintain order use case.6. The customer iterates over 3 through 5 until finished shopping.7. The customer executes the checkout use case.8. The customer leaves the website.

Page 12: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 12

Page 13: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 13

Collaboration Diagrams

Essentially an object diagram that shows message passing relationships instead of aggregation or generalization associations.Emphasize the flow of messages among objects, rather than timing and ordering of messagesIn UML 2.0 it is called Communication Diagram

Page 14: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 14

Example Collaboration Diagram

Page 15: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 15

Collaboration Diagram Syntax

Actor

Object

Association

Message

Frame

Page 16: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 16

Communication Diagrams

1. Set the context.2. Identify which objects (actors) and

the associations between the objects participate in the collaboration.

3. Layout the communication diagram.4. Add messages.5. Validate the communication

diagram.

Page 17: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 17

“CRUD” Analysis Example

Page 18: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 18

Building a Collaboration Diagram

Determine the context of the collaboration diagramIdentify the participating objects and their associationsLayout objects and associationsAdd messagesValidate the collaboration diagram

Page 19: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 19

Page 20: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 20

Behavioral State Machines

The behavioral state machine is a dynamic model that shows the different states of the object and what events cause the object to change from one state to another, along with its responses and actions.

Page 21: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 21

Elements of a Behavioral State Machine

StatesEventsTransitionsActionsActivities

Page 22: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 22

Example Behavioral State Machine Diagram

Page 23: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 23

Behavioral State Machine Diagram Syntax

A STATE

AN INITIAL STATE

A FINAL STATE

AN EVENT

A TRANSITION

A Frame

Page 24: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 24

Building Behavioral State Machine Diagrams

Set the contextIdentify the initial final, and stable states of the objectDetermine the order in which the object will pass through stable statesIdentify the events, actions, and guard conditions associated with the transitionsValidate the statechart diagram

Page 25: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 25

Page 26: Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.

Slide 26

SummarySequence diagrams illustrate the classes that participate in a use case and the messages that pass between them.Collaboration diagrams provide a dynamic view of the object-oriented system and accentuate message passing between collaborating actors and objects.Behavioral State Machine diagrams show the different states that a single class passes through in response to events.