Download presentation
Presentation is loading. Please wait.
Published byMartina Lawson Modified over 9 years ago
1
© 2010 Bennett, McRobb and Farmer1 Object Interaction – Interaction Overview Diagrams Timing Diagrams Based on Chapter 09 Bennett, McRobb and Farmer Object Oriented Systems Analysis and Design Using UML 4 th Edition, McGraw Hill, 2010
2
© 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.
3
© 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.
4
© 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
5
© Bennett, McRobb and Farmer 2005 5 :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] ref Create advert Create request ref Get campaign budget addCostedAdvert
6
© 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]
7
© Bennett, McRobb and Farmer 2005 7 Interaction Fragment Used :Campaign :Advert Advert newAd:Advert sd Create advert
8
© Bennett, McRobb and Farmer 2005 8 Interaction Fragment Used :Campaign :Advert newRequest:Request Request sd Create request
9
© Bennett, McRobb and Farmer 2005 9 ref Get campaign budget [totalCost <= budget] ref Create advert Create request ref :Campaign :CampaignManager addCostedAdvert sd Add costed advert [totalCost > budget] sd Add a new advert to a campaign if within budget :Client :Campaign getName listCampaigns getCampaignDetails :CampaignManager sd List Campaigns for Client loop [For all client’s campaigns] Decision Interaction occurrence In-line sequence diagram Initial node Final node
10
© Bennett, McRobb and Farmer 2005 10 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
11
© Bennett, McRobb and Farmer 2005 11 Timing Diagrams :TicketMachine :Barrier after:WeightSensor sd Car enters car park raiseBarrier lowerBarrier before:WeightSensor activate Raised Lowered Active deactivate Blocked barrierLowered Inactive ticketRequested
12
© Bennett, McRobb and Farmer 2005 12 Timing Diagrams 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 Sloped line represents duration of state change Message from one lifeline to another
13
© Bennett, McRobb and Farmer 2005 13 Model Consistency Timing diagrams must be consistent with the relevant sequence diagrams and state machines.
14
© Bennett, McRobb and Farmer 2005 14 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.
15
© Bennett, McRobb and Farmer 2005 15 References UML Reference Manual (OMG, 2009) Bennett, Skelton and Lunn (2005) (For full bibliographic details, see Bennett, McRobb and Farmer)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.