Download presentation
Presentation is loading. Please wait.
Published byMiles Osborne Modified over 6 years ago
1
Object Interaction – Interaction Overview Diagrams Timing Diagrams
Based on Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design Using UML, (3rd Edition), McGraw Hill, 2005. © Bennett, McRobb and Farmer 2005
2
In This Lecture You Will Learn:
how to model interactions using interaction overview diagrams; how to model interaction using an interaction sequence diagram; how to use timing diagrams. © Bennett, McRobb and Farmer 2005
3
Interaction Overview Diagrams
Variants of activity diagrams (see Ch 5) Focuses on the flow of control in an interaction Nodes in the diagram may be interactions or interaction occurrences Interaction needs to be broken down into its key elements. © Bennett, McRobb and Farmer 2005
4
Interaction Overview Diagrams
An alternative version of the sequence diagram Add a new advert to a campaign if within budget is shown on the next slide and is used to develop an interaction overview diagram © Bennett, McRobb and Farmer 2005
5
sd Add a new advert to a campaign if within budget
:Client :Campaign :Advert getName listCampaigns ref :CampaignManager alt [else] sd Add a new advert to a campaign if within budget List client campaigns [totalCost <= budget] Create advert Create request Get campaign budget addCostedAdvert © Bennett, McRobb and Farmer 2005
6
Interaction Fragment Used
:Campaign :Advert getCost sd Get campaign budget loop getOverheads checkCampaignBudget :CampaignManager [For all campaign’s adverts] © Bennett, McRobb and Farmer 2005
7
Interaction Fragment Used
:Campaign :Advert Advert newAd:Advert sd Create advert © Bennett, McRobb and Farmer 2005
8
Interaction Fragment Used
:Campaign :Advert newRequest:Request Request sd Create request © Bennett, McRobb and Farmer 2005
9
Interaction occurrence In-line sequence diagram
sd Add a new advert to a campaign if within budget sd List Campaigns for Client :CampaignManager :Client :Campaign getName listCampaigns loop [For all client’s campaigns] getCampaignDetails Initial node ref Get campaign budget Interaction occurrence In-line sequence diagram sd Add costed advert :Campaign :CampaignManager addCostedAdvert Decision [totalCost <= budget] [totalCost > budget] ref ref Create advert Create request © Bennett, McRobb and Farmer 2005 Final node
10
© Bennett, McRobb and Farmer 2005
Timing Diagrams A new feature in UML 2.0 Show how time constraints affect interactions between lifelines The sequence diagram Car enters car park is the basis for the subsequent timing diagram © Bennett, McRobb and Farmer 2005
11
© Bennett, McRobb and Farmer 2005
Timing Diagrams :TicketMachine :Barrier after:WeightSensor sd Car enters car park raiseBarrier lowerBarrier before:WeightSensor activate Raised Lowered Active deactivate Blocked barrierLowered Inactive ticketRequested © Bennett, McRobb and Farmer 2005
12
Timing Diagrams Sloped line represents duration of state change
sd Car enters car park lifelines :Barrier, :TicketMachine :Barrier :TicketMachine Lowered Raised Inactive Active Blocked t {t..t+3s} Timing Constraint raiseBarrier barrierLowered Diagram has two instances, one for each lifeline Message from one lifeline to another © Bennett, McRobb and Farmer 2005
13
© Bennett, McRobb and Farmer 2005
Model Consistency Timing diagrams must be consistent with the relevant sequence diagrams and state machines. © Bennett, McRobb and Farmer 2005
14
© Bennett, McRobb and Farmer 2005
Summary In this lecture you have learned about: how to model interactions using interaction overview diagrams; how to model interaction using an interaction sequence diagram; how to use timing diagrams. © Bennett, McRobb and Farmer 2005
15
© Bennett, McRobb and Farmer 2005
References UML Reference Manual (OMG, 2004) Bennett, Skelton and Lunn (2005) (For full bibliographic details, see Bennett, McRobb and Farmer) © Bennett, McRobb and Farmer 2005
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.