Unformatted text preview:

Information Systems Analysis and Design CSC340 Information Systems Analysis and Design IX Sequence and Collaboration Diagrams Interaction 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 Employer Assign d Dept Employee Company Assign development IBM Company Modeling the system Assign development IBM Company Employee 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 3 Information Systems Analysis and Design CSC340 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 Staff Person Call iteration Scheduler Person Getting back to the use case Add a new campaign Participant Person Add new campaign participating object Inform mtgDetails StaffContact Time Inform mtgDetails Acknowledge Operations Messages Contact Creative Client Campaign Add new campaign Staff Staff Select nmC Find client by name New Create new campaign Select nmCS Find creative staff member by AssignManager Remind mtg condition CSC340 Example Add a New Campaign Respond What s up Sequence and Collaboration Diagrams 4 Information Systems Analysis and Design The Basic Idea Initiator Person CSC340 Sequence Diagrams Modeling the real world Employee Sequence and Collaboration Diagrams 2 Information Systems Analysis and Design 1 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 The Nature of an Interaction Employee CSC340 Inform timetable Prompt timetables Show schedule name Assign campaign manager decision OK ScheduleOK ed Inform mtg Objects 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 5 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 6 Information Systems Analysis and Design CSC340 Information Systems Analysis and Design Add another New Campaign CSC340 A More Realistic Example Getting back to the use case Add a new campaign New object Staff Contact Client Find client by name Select nm New nm Create new campaign c Select c Assign creative staff StaffContact Contact Client Creative Staff Add new campaign Add new campaign 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 member to c Assign campaign manager Inform the creative staff person Creative StaffE c Campaign AssignManager Inform c Objects 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 7 Information Systems Analysis and Design CSC340 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 8 Information Systems Analysis and Design CSC340 Another Example Print Shop An Even More Realistic Example External objects CustomerP New object Staff Contact Client Select nm New nm Creative Staff Creative StaffE Lifeline Printer PrinterP PrintFile file Queue Inactive GetStatus c Campaign Select c AssignManager c CampaignE Ready Print Active Busy PutInQueue file Branching Inform c OutOfService CallRepair Done Ready file Ready file GetNext Asynchronous 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 9 Information Systems Analysis and Design CSC340 2003 Jaelson Castro and John Mylopoulos Information Systems Analysis and Design This procedure call operation is creating an instance of class A objA A CSC340 Iteration Flow of Control createObj Sequence and Collaboration Diagrams 10 objB B 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 doit These return arrows are optional in a procedural flow of control 2003 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams 11 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 Information Systems Analysis and Design Drawing Sequence Diagrams Campaign and Advert 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 Campaign 1 Class diagram showing aggregation Sequence and Collaboration Diagrams 13 Information Systems Analysis and Design CSC340 2003 Jaelson Castro and John Mylopoulos Advert Title String Type String TargetDate Date CompletedDate Date EstimatedCost Money Completed CompletionDate Date ActualCost Money SetFinishDate FinishDate Date RecordPayment DatePaid Date CostDifference Money GetCampaignContribution Money CheckBudget Money SetCompleted CompletedDate Date Today GetTitle String GetType String GetTargetDate Date GetCompletedDate Date GetCost Money Sequence and Collaboration Diagrams 15 Information Systems Analysis and Design CSC340 2003 Jaelson Castro and John Mylopoulos Where do we start Select the relevant Campaign probably using its name How we select it is something we leave for the design phase it could be from a list box it could involve a separate window on the


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?