Title: MIS 160 Systems Development Life Cycle I
1MIS 160Systems Development Life Cycle I
- Lecture 12
- Behavioral Models-
- Interaction Diagrams
2Relationship of Use Case, Class, and Interaction
Diagrams
3Object and Class Names
4Purpose of Behavioral Models
- To depict the internal view of business processes
- To show the effects of varied processes on the
system
5Interaction Diagrams
- Interaction diagrams describe how groups of
objects collaborate in some behavior - Represent behavior in the system
- Shows behavior of a single use case across
multiple objects - Two types of interaction diagrams
- sequence diagrams
- collaboration diagrams
6Constructing Interaction Diagrams
- 1. Construct a sequence diagram for each use
case - a. Determine the objects involved in the use
case - b. Determine the communication (messages)
between the objects - c. Draw the sequence diagram
- 2. Construct a collaboration diagram from each
sequence diagram - 3. Modify use cases and class diagram as
necessary
7Sequence Diagrams
- Captures the behavior of a single use case
- Show the messages that pass between objects for a
particular use-case - Illustrate the objects that participate in a
use-case - Shows the sequence of events that transpire as
objects communicate - Represents a specific set of messages and
interactions between objects - Shows precise temporal order (easy to see the
order in which things occur)
8Sequence Diagram Syntax
AN ACTOR AN OBJECT A LIFELINE A FOCUS OF
CONTROL A MESSAGE OBJECT DESTRUCTION
anObjectaClass
aMessage()
x
9Symbols of a Sequence Diagram
10Sequence Diagram Development
- 1. Identify all objects and actors involved in
scenario - 2. Identify each message required to carry out
scenario - 3. Determine whether each message is always sent
or if only sent under certain conditions
11Sequence Diagram Development
- 4. Sequence messages correctly and attach to
appropriate lifelines - 5. Add formal syntax to messages
- 6. Add response messages and communications to
complete diagram
12Actors and Objects
- Both are things
- External
- Actors
- Role of Customer
- Physical person
- Internal
- Objects
- Computer artifacts
- Both send and receive messages
13Messages
- Internal events identified by the flow of objects
within a scenario - Requests from one actor or object to another to
do some action - Invokes a particular method
14Example Message-Name Formats
- Ring Telephone
- ItemInquiry ()
- CreateOrderItem (ItemId, qty)
- FirstItem OrderNumberCreateOrder ()
15Messages
- Simple
- transfers control from one object to another
- Synchronous
- object waits for an answer to that message before
it proceeds with its business - Asynchronous
- object does not wait for an answer before
proceeding - Recursion
- an object has an operation that invokes itself
16Message Types
17Lifelines
- Vertical line under object or actor to show
passage of time - If dashed, creation and destruction of thing is
not important for scenario - Activation lifelines are long narrow rectangles
used to emphasize that an object is active only
during part of a scenario for a sequence diagram
18Example Sequence Diagram
19Collaboration Diagrams
- Another way of looking at interaction
- 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 messages - Good at showing how objects are statically
connected - Collaboration and sequence diagrams are
semantically equivalent - Cannot easily describe concurrent messages or
creation/deletion of objects
20Collaboration Diagram Syntax
AN ACTOR AN OBJECT AN ASSOCIATION A
MESSAGE
anObjectaClass
21Symbols of a Collaboration Diagram
22Building a Collaboration Diagram
- Determine the context of the collaboration
diagram - Identify the participating objects and their
associations - Layout objects and associations
- Add messages
- Validate the sequence diagram
23Example Collaboration Diagram