DOC PREVIEW
Toronto CSC 340 - Sequence and Collaboration Diagrams

This preview shows page 1-2-3-4-5 out of 14 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Information Systems Analysis and Design CSC340© 2002 Jaelson Castro and John Mylopoulos Sequence and Collaboration Diagrams -- 1IX. Sequence andIX. Sequence andCollaboration DiagramsCollaboration DiagramsInteraction DiagramsSequence DiagramsExamplesCollaboration Diagrams© 2003 Jaelson Castro and John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 2Interaction DiagramsInteraction Diagrams Interactions among objects are modeled by interactiondiagrams. An interaction between two objects A and B involves object Asending a message requesting an action that object B canperform. 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 MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 3The Nature of an InteractionThe Nature of an InteractionEmployeeCompanyEmployeeEmployer1..**:EmployeeAssign(d:Dept)IBM:CompanyAssign(development):EmployeeIBM:CompanyAssign(development)Modeling the real worldModeling the system© 2003 Jaelson Castro and John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 4Sequence DiagramsSequence Diagrams Sequence diagrams describe in detail how actors use use cases;they can also model external business processes the new systemwill support (e.g., processing a book order) An interactioninteraction is a behavior that consists of a set of messagesexchanged between external and system objects. Interactions consist of one or more messages. Interactions may besynchronous (e.g., calling someone on the phone), orasynchronous (e.g., sending someone email). Sequence diagrams defined during requirements analysis shouldnot: include design objects; specify message signatures in any detail;© 2003 Jaelson Castro and John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 5The Basic IdeaThe Basic IdeaCall()Respond()What’s up?()Inform(mtgDetails)*Inform( mtgDetails) *Remind( mtg)Prompt(timetables)Show(schedule)[decision=OK] ScheduleOK’ed()Initiator:PersonParticipant:Person*Inform(mtg) Staff:PersonScheduler:PersonAcknowledge()Inform(timetable)conditioniterationparticipatingobjectTime© 2003 Jaelson Castro and John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 6Example: Add a New CampaignExample: Add a New Campaign Getting back to the use case “Add a new campaign”StaffContactAdd new campaignAdd new campaign Find client by name Create new campaign Find creative staff member byname Assign campaign manager:Client :Campaign:CreativeStaffSelect(nmC)New()Select(nmCS)AssignManager()ObjectsOperations/MessagesContact:Staff© 2003 Jaelson Castro and John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 7Add another New CampaignAdd another New Campaign Getting back to the use case “Add a new campaign”StaffContactAdd new campaignAdd new campaign Get client details Create new campaign Find creative staff member byname Assign campaign manager:Campaign :CreativeStaffGetInfo()New()Select()AssignManager()ObjectsContact:Staff:Client© 2003 Jaelson Castro and John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 8A More Realistic ExampleA More Realistic ExampleAdd new campaign Find client by name; Create new campaign c; Assign creative staffmember to c; Assign campaignmanager; Inform the creative staffperson.:Clientc:Campaign:CreativeStaffSelect(nm)New(nm)Select(c)AssignManager()StaffContact::CreativeStaffEInform(c)New object© 2003 Jaelson Castro and John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 9An Even More Realistic ExampleAn Even More Realistic Example:Clientc:Campaign:CreativeStaffSelect(nm)New(nm)Select(c)AssignManager()StaffContact::CreativeStaffEInform(c)New objectc:CampaignEExternal objects© 2003 Jaelson Castro and John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 10Another Example: Print ShopAnother Example: Print Shop:CustomerP:PrinterPPrintFile(file):PrinterGetStatus():Queue[Ready]Print()[Busy]PutInQueue(file)[OutOfService]CallRepairReady(file)GetNext()BranchingReady(file)AsynchronousDoneLifelineInactiveActive© 2003 Jaelson Castro and John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 11Flow of ControlFlow of ControlobjA:AobjB:BcreateObj()This procedure call (operation) is creating an instance of class Adoit()These return arrows are optional in a procedural flow of control© 2003 Jaelson Castro and John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 12IterationIteration 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 theone currently selected There is only one loop!DescriptionStartFor Each StaffMemberSelect next Staff MemberCalculate Bonus for StaffMember:StaffMemberCalculate Staff Bonuses* SelectCalculateBonus()Iteration:StaffMember*[For each StaffMember]CalculateBonus()or© 2003 Jaelson Castro and John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 13Drawing Sequence DiagramsDrawing Sequence Diagrams For a particular use case, start by identifying which objectsand 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 calledCheck Campaign Budget Each Campaign has an EstimatedCost attribute andeach Advert has an EstimatedCost attribute. The purpose of the use case is to check that the totalestimated cost of all the adverts is less than that for thecampaign as a whole. ...Which objects are involved here?© 2003 Jaelson Castro and John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 14CampaignAdvert*1containsClass diagramshowingaggregationCampaignCampaign and and AdvertAdvert© 2003 Jaelson Castro and John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams --


View Full Document

Toronto CSC 340 - Sequence and Collaboration Diagrams

Documents in this Course
Scoping

Scoping

10 pages

Load more
Download Sequence and Collaboration Diagrams
Our administrator received your request to download this document. We will send you the file to your email shortly.
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 2 2 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?