Download presentation
Presentation is loading. Please wait.
Published byGabriella Maxwell Modified over 6 years ago
1
UML - The Dynamic View: Sequence and Collaboration Diagrams
2
The Dynamic View Sequence Diagram Collaboration Diagram
State Chart Diagram
3
Sequence Diagram [1] 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
4
Collaboration Diagram
[1] 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
5
Sequence Diagram [1] 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
6
Sequence Diagram [1] 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
7
Object Creation [1] 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
8
Collaboration Diagram
[1] 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
9
Collaboration Diagram
[1] 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
10
Sequence Diagram Example
[1] Use the Scenarios from the Activity Diagram 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
11
Sequence Diagram Example
[1] Define the Objects Participating in the given scenario 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
12
Sequence Diagram Example
[1] … add messages 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
13
Sequence Diagram Example
[1] 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
14
Sequence Diagram Example
[1] 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
15
Sequence Diagram Example
[1] 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
16
Sequence Diagram Example
[1] 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
17
Sequence Diagram Example
[1] 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
18
Sequence Diagram Example
[1] 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
19
Collaboration Diagram Example
[1] Use the Scenarios from the Activity Diagram 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
20
Collaboration Diagram Example
[1] Define the Objects Participating in the given scenario 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
21
Collaboration Diagram Example
[1] Link the Objects and … 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
22
Collaboration Diagram Example
[1] … add collaborations 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
23
Collaboration Diagram Example
[1] Or add links one by one as you add collaborations 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
24
Collaboration Diagram Example
[1] Or add links one by one as you add collaborations 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
25
Collaboration Diagram Example
[1] 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
26
Collaboration Diagram Example
[1] 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
27
Mapping to the Class Diagram
[1] 1) Pender, T.A UML Weekend Crash Course. pp Wiley, New York , NY.
28
Support Relationships
[1] 1) Pender, T.A UML Weekend Crash Course. Wiley, New York , NY.
29
UML Views and Diagrams [1]
1) Pender, T.A UML Weekend Crash Course. Wiley, New York , NY.
30
CRC Methodology
31
CRC Methodology “Classes, Responsibilities, Collaborations” methodology… … is not UML … is not a part of UML … does not use UML … , but can be used in support of UML
32
A Sample CRC Card[1] 1) Pender, T.A UML Weekend Crash Course. Wiley, New York , NY.
33
The CRC Process[1] Before the Scenario Execution
During the Scenario Execution After the Scenario Execution 1) Pender, T.A UML Weekend Crash Course. Wiley, New York , NY.
34
Before the Scenario Execution[1]
Define the problem Brainstorm for classes Define and filter classes Assign cards to members 1) Pender, T.A UML Weekend Crash Course. Wiley, New York , NY.
35
During the Scenario Execution[1]
“Simulate” scenarios to discover responsibilities Assign each responsibility to the proper class Identify similar classes, and group the cards Review the scenario list for completeness Draw collaborations between classes 1) Pender, T.A UML Weekend Crash Course. Wiley, New York , NY.
36
After the Scenario Execution[1]
Review the model Plan the implementation 1) Pender, T.A UML Weekend Crash Course. Wiley, New York , NY.
37
Algorithms and Protocols
38
Algorithm Specified sequence of steps that Representation:
accomplish a designated task in a finite number of steps Representation: simple algorithm: flowchart complicated algorithm: program
39
Example: One Turn at Monopoly
Move token number of squares indicated on dice Start turn Throw dice Land on “go to jail”? Move to “jail” square Yes No Do not move; follow policies for square (like “pay rent”) Finish turn
40
Algorithm Building Blocks
Start Start Start Programming languages support these three building blocks Action Action Decision Test Action Action Action Action Finish Finish Finish Loop Sequence Selection
41
Protocol Distributed algorithm realized by two or more modules to coordinate their actions or accomplish some shared task Module interoperability requires a protocol Prescribed order of method invocations Part of interface documentation
42
Monopoly Players Protocol
One-turn algorithm This is a protocol interaction diagram Time
43
Application and infrastructure
The application defines its own application-level protocols Internally, the network uses protocols to implement the services it provides
44
Three simple protocols
One-way message: send-receive Two-way interaction: request-response Push: publish-subscribe
45
Client Server send receive request response subscribe responses Time
46
Example: HTTP User activates URL HTTP request HTTP response
HTTP client (browser) HTTP server HTTP response (embedded document) Browser displays document (if HTML) or invokes “helper application” HTML documents
47
Example: Stock trading
Customer wants to purchase 10 shares of MSFT if price is below $90 Customer StockTrader What is application protocol?
48
Locating Things
49
Three ways of locating things
Name “John Doe” Address “1299 Rockville Pike, Rockville, MD” Reference “Postmaster of Rockville MD”
50
Name Symbolic (character string) representation
Easy for people to remember or guess Identifies but does not locate directly Distinction important for mobile entities Not unique: entities can have more than one name (called aliases)
51
Hierarchical names Hierarchy makes names easier to remember or guess
Host domain names: “info.sims.berkeley.edu” designates administrative hierarchy File names: “c:\My Documents\Docs\Resume.doc” designates folder hierarchy
52
Address Route or path to entity
is directly specified, or can be inferred Independent of who or what is locating entity Topological specification
53
Example 4 3 1 2 Path from to is (1,2,2,2,1,1,1,1)
Not an address, because it depends on starting point
54
Example (1,1) (1,2) (1,3) (1,4) (1,4) (2,1) (2,2) (2,3) (2,4) (2,5)
Address of is (2,5) Route from can be inferred
55
Reference Abstract representation of an entity
Interaction is with representation infrastructure arranges redirection to actual entity especially appropriate for things that move
56
Reference Client Server address
57
Name services 3. interaction 1. name 2. address or reference Name
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.