OOSAD Chapter 9

Download Report

Transcript OOSAD Chapter 9

Chapter 9, Part II:
System Behavior - Interactions
(Adapted)
Object-Oriented Systems Analysis and
Design
Joey F. George, Dinesh Batra,
Joseph S. Valacich, Jeffrey A. Hoffer
© Prentice Hall, 2004
9-1
Outline
- Analysis Class Diagram (Fully Fledged
Class Diagram; read skill)
- Interactions by Sequence Diagram
(read & write skill)
- Interactions by Collaboration Diagram
- (read skill)
Chapter 9
© Prentice Hall, 2004
9-2
Goal:
Get to a
Fully Fledged
Class Diagram
G
Chapter 9
© Prentice Hall, 2004
9-3
Activity Diagram of Analyzing Information Systems
Analyze System’s Processes
(Use Case Diagrams/Descriptions,
Data Flow Diagrams)
Represent System’s Logic
(Activity Diagram,
Decision Tables)
Represent System’s Data
(Conceptual Data ModelPartial Class Diagram;
Object-Relational Notation)
Represent System’s Interactions
(Sequence Diagram,
Collaboration Diagram)
Finalize Class Diagram
Chapter 9
© Prentice Hall, 2004
9-4
Categorizing (Stereotyping)
Classes (Analysis Classes)
Corresponds to
conceptual data
model classes –
Data
Chapter 9
Connections
between actors and
use cases –
User Interface,
other interfaces
© Prentice Hall, 2004
Performs behaviors
associated with
inner workings of
use cases –
Managing
transactions, logic,
business rules
9-5
Chapter 9
© Prentice Hall, 2004
9-6
Sequence Diagram

A UML diagram that shows the interaction
between objects to perform critical pieces of
use case behavior in a time-ordered manner

Interactions are in the form of messages

Behavioral responsibilities are assigned to
message recipients
Chapter 9
© Prentice Hall, 2004
9-7
Symbols in a Sequence Diagram

Object: Box or class stereotype symbol

Object’s lifetime: Dotted vertical line

Focus of Control: Thin bars; periods of time when
object is behaving (fulfilling responsibilities).

Message: Labeled horizontal arrows between
objects. Run one or both ways (message-response).
Chapter 9
© Prentice Hall, 2004
9-8
Chapter 9
© Prentice Hall, 2004
9-9
Typically, actors interact
with boundary classes,
which in turn interact with
control classes (if exist),
which in turn interact with
entity classes.
Chapter 9
© Prentice Hall, 2004
9-10
Chapter 9
© Prentice Hall, 2004
9-11
Collaboration Diagram

A UML diagram that shows the interactions
between objects to perform critical pieces of
the use case behavior

Unlike sequence diagrams, collaboration
diagrams have no spatial representation of
time; sequences of messages are shown by
numbering.
Chapter 9
© Prentice Hall, 2004
9-12
Chapter 9
© Prentice Hall, 2004
9-13
Analysis Class Diagram
• Fully fledged Class Diagram with both data and operations
(methods, responsibilities).
Operations (behaviors)
are specified at the bottom
of a class box.
Operations fulfill the classes’
responsibilities.
Chapter 9
© Prentice Hall, 2004
9-14