Unformatted text preview:

Information Systems Analysis and Design CSC340 IX Sequence and Collaboration Diagrams Interaction Diagrams Sequence Diagrams Examples Collaboration Diagrams 2002 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 1 Information Systems Analysis and Design CSC340 Interaction Diagrams Interactions among objects are modeled by interaction diagrams An interaction between two objects A and B involves object A sending a message requesting an action that object B can perform There are two types of interaction diagrams Sequence diagrams Collaboration diagrams We discuss each in detail in the rest of this lecture unit 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 2 Information Systems Analysis and Design CSC340 The Nature of an Interaction Employee 1 Assign d Dept Employee Company Employer Modeling the real world Assign development Employee IBM Company Modeling the system Assign development Employee 2003 Jaelson Castro and John Mylopoulos IBM Company Sequence and Collaboration Diagrams 3 Information Systems Analysis and Design CSC340 Sequence Diagrams Sequence diagrams describe in detail how actors use use cases they can also model external business processes the new system will support e g processing a book order An interaction is a behavior that consists of a set of messages exchanged between external and system objects Interactions consist of one or more messages Interactions may be synchronous e g calling someone on the phone or asynchronous e g sending someone email Sequence diagrams defined during requirements analysis should not include design objects specify message signatures in any detail 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 4 Information Systems Analysis and Design CSC340 The Basic Idea Initiator Person Staff Person Call iteration Scheduler Person Participant Person Respond participating object What s up Inform mtgDetails Time Inform mtgDetails Acknowledge Remind mtg condition Inform timetable Prompt timetables Show schedule decision OK ScheduleOK ed Inform mtg 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 5 Information Systems Analysis and Design CSC340 Example Add a New Campaign Getting back to the use case Add a new campaign Add new campaign StaffContact Operations Messages Contact Client Campaign Add new campaign Staff Select nmC Find client by name New Create new campaign Select nmCS Find creative staff member by AssignManager name Assign campaign manager Creative Staff Objects 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 6 Information Systems Analysis and Design CSC340 Add another New Campaign Getting back to the use case Add a new campaign Add new campaign StaffContact Contact Client Campaign Creative Staff Staff Add new campaign GetInfo Get client details New Create new campaign Select Find creative staff member by AssignManager name Assign campaign manager Objects 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 7 Information Systems Analysis and Design CSC340 A More Realistic Example New object Staff Add new campaign Contact Client Find client by name Select nm New nm Create new campaign c Select c Assign creative staff member to c Assign campaign manager Inform the creative staff person 2003 Jaelson Castro and John Mylopoulos Creative Staff Creative StaffE c Campaign AssignManager Inform c Sequence and Collaboration Diagrams 8 Information Systems Analysis and Design CSC340 An Even More Realistic Example External objects New object Staff Contact Client Select nm New nm Creative Staff Creative StaffE c Campaign Select c AssignManager c CampaignE Inform c 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 9 Information Systems Analysis and Design CSC340 Another Example Print Shop CustomerP Lifeline Printer PrinterP PrintFile file Queue Inactive GetStatus Ready Print Active Busy PutInQueue file Branching OutOfService CallRepair Done Ready file Ready file GetNext Asynchronous 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 10 Information Systems Analysis and Design CSC340 Flow of Control This procedure call operation is creating an instance of class A createObj objA A objB B doit These return arrows are optional in a procedural flow of control 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 11 Information Systems Analysis and Design CSC340 Iteration Iteration repetition of an operation is shown with an asterisk Each StaffMember will be selected in turn Once selected the CalculateBonus message will be sent to the one currently selected StaffMember There is only one loop Iteration Calculate Staff Bonuses Description Start or For Each StaffMember Select next Staff Member Calculate Bonus for Staff Member 2003 Jaelson Castro and John Mylopoulos Select CalculateBonus StaffMember For each StaffMember CalculateBonus Sequence and Collaboration Diagrams 12 Information Systems Analysis and Design CSC340 Drawing Sequence Diagrams For a particular use case start by identifying which objects and actors might be involved You may not get this right but you can always change it Imagine that there is a use case required by Agate called Check Campaign Budget Each Campaign has an EstimatedCost attribute and each Advert has an EstimatedCost attribute The purpose of the use case is to check that the total estimated cost of all the adverts is less than that for the campaign as a whole Which objects are involved here 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 13 Information Systems Analysis and Design CSC340 Campaign and Advert Campaign 1 Class diagram showing aggregation contains Advert 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 14 Information Systems Analysis and Design CSC340 The Campaign Class Campaign Title String CampaignStartDate Date CampaignFinishDate Date EstimatedCost Money ActualCost Money CompletionDate Date DatePaid Date StaffCount Integer 0 Completed CompletionDate Date ActualCost Money SetFinishDate FinishDate Date RecordPayment DatePaid Date CostDifference Money GetCampaignContribution Money CheckBudget Money 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 15 Information Systems Analysis and Design CSC340 The Advert Class Advert Title String Type String TargetDate Date CompletedDate Date EstimatedCost Money SetCompleted


View Full Document

Toronto CSC 340 - Sequence and Collaboration Diagrams

Documents in this Course
Scoping

Scoping

10 pages

Load more
Loading Unlocking...
Login

Join to view Sequence and Collaboration Diagrams and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Sequence and Collaboration Diagrams and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?