Sequence diagram

advertisement
Modern Systems Analysis
and Design
Fifth Edition
Jeffrey A. Hoffer
Joey F. George
Joseph S. Valacich
Appendix
Object-Oriented Analysis and Design:
Sequence Diagrams and Activity Diagrams
Learning Objectives
 Understand
how to represent system
logic with sequence diagrams.
 Understand how to represent system
logic with activity diagrams.
Chapter 8 Appendix
© 2008 by Prentice Hall
2
Dynamic Modeling: Sequence
Diagrams




Sequence diagram: depicts the
interactions among objects during a certain
periods of time.
May be presented either in a generic form
or in an instance form.
Generic form shows all possible
sequences of interactions – sequences
corresponding to all the scenarios of a use
case.
Instance form shows the sequence for only
one scenario.
Chapter 8 Appendix
© 2008 by Prentice Hall
3
Dynamic Modeling: Sequence
Diagrams (Cont.)

Elements of a sequence diagram

Objects: represented by boxes at top of
diagram.
 Lifeline: the time during which an object
exists.
 Messages: means by which objects
communicate with each other.
Chapter 8 Appendix
© 2008 by Prentice Hall
4
Dynamic Modeling: Sequence
Diagrams (Cont.)
 Activation:
the time period during
which an object performs an
operation.
 Synchronous message: a type of
message in which the caller has to
wait for the receiving object to finish
executing the called operation
before it can resume execution
itself.
Chapter 8 Appendix
© 2008 by Prentice Hall
5
Dynamic Modeling: Sequence
Diagrams (Cont.)
 Simple
message: a message that
transfer control from the sender to
the recipient without describing the
details of the communication.
 Asynchronous message: a
message in which the sender does
not have to wait for the recipient to
handle the message.
Chapter 8 Appendix
© 2008 by Prentice Hall
6
Designing a Use Case with a
Sequence Diagram
Figure 8-11 Sequence diagram for a class registration scenario without prerequisites
Chapter 8 Appendix
© 2008 by Prentice Hall
7
Designing a Use Case with a
Sequence Diagram
Figure 8-12 A generic sequence diagram for the
“Prerequisite Courses Not Completed” use case
Chapter 8 Appendix
© 2008 by Prentice Hall
8
A Sequence Diagram for
Hoosier Burger
Figure 8-13 Sequence diagram for Hoosier Burger’s Hire Employee use case
Chapter 8 Appendix
© 2008 by Prentice Hall
9
Process Modeling: Activity
Diagrams
Activity Diagrams: shows the conditional
logic for the sequence of system activities
needed to accomplish a business process.
 Clearly shows parallel and alternative
behaviors.
 Can be used to show the logic of a use
case.

Chapter 8 Appendix
© 2008 by Prentice Hall
10
Process Modeling: Activity
Diagrams (Cont.)
Figure 8-14 Activity diagram for a customer order process.
Chapter 8 Appendix
© 2008 by Prentice Hall
11
Process Modeling: Activity
Diagrams (Cont.)
 Elements
of Activity Diagrams:
Activity:
a behavior that an object
carries out while in a particular state.
Transition: a movement from one
activity or state to another.
Branch: a diamond symbol
containing a condition whose results
provide transitions to different paths
of activities.
Chapter 8 Appendix
© 2008 by Prentice Hall
12
Process Modeling: Activity
Diagrams (Cont.)
Synchronization
bar: horizontal or
vertical bars denoting parallel or
concurrent paths of activities.
 Fork:
the beginning of parallel activities.
 Join: the end of parallel activities.
Swimlanes:
columns representing
different organizatonal units of the
system.
Chapter 8 Appendix
© 2008 by Prentice Hall
13
Summary
 In
this appendix you learned how to:
Understand how to represent system
logic with sequence diagrams.
 Understand how to represent system
logic with activity diagrams.

Chapter 8 Appendix
© 2008 by Prentice Hall
14
Download