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 DesignCSC340© 2004 John Mylopoulos Sequence and Collaboration Diagrams -- 1X. Sequence andX. Sequence andCollaboration DiagramsCollaboration DiagramsInteraction DiagramsSequence DiagramsExamplesCollaboration Diagrams© 2004 John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 2Interaction DiagramsInteraction Diagrams Interactions among actors (people/objects) aremodeled by interaction diagrams. An interaction involve the exchange of messagesbetween two or more actors. There are two types of interaction diagrams: Sequence diagrams; Collaboration diagrams.© 2004 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© 2004 John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 4Sequence DiagramsSequence Diagrams Sequence diagrams describe in detail how actors useuse cases; they can also model external businessprocesses. Interactions consist of one or more messages.Interactions may be synchronous, or asynchronous. Sequence diagrams defined during requirementsanalysis should not: include design objects; specify message signatures in any detail.© 2004 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)conditioniterationparticipatingactorTime© 2004 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:StaffWhen isan objectactive© 2004 John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 7Add New CampaignAdd New Campaign This describes a business process, no system involved.StaffContactAdd new campaignAdd new campaign Get client details Create new campaign Select staff members Assign campaign manager:Campaign :CreativeStaffGetInfo()New()Select()AssignManager()Contact:Staff:Client© 2004 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 This describes a business process involving two peopleand three system objects.© 2004 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© 2004 John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 10Another Example: Print ShopAnother Example: Print Shop:CustomerE:PrinterEPrintFile(file):PrinterGetStatus():Queue[Ready?]Print()[Busy?]PutInQueue(file)[OutOfService?]CallRepairReady(file)GetNext()BranchingReady(file)AsynchronousEnd of lifelineLifelineInactiveActive© 2004 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© 2004 John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 12IterationIteration Iteration shown with an asterisk. Each StaffMember will be selected in turn Once selected, the CalculateBonus message willbe sent to the one currently selected There is only one loop!DescriptionStartFor Each StaffMemberSelect next Staff MemberCalculate Bonus for StaffMember:StaffMemberCalculate Staff Bonuses* SelectIteration:StaffMember*[For each StaffMember]CalculateBonus()orCalculateBonus()© 2004 John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 13Drawing Sequence DiagramsDrawing Sequence Diagrams For a use case, identify participating actors. Imagine that there is a use case required byAgate called Check Campaign Budget. Campaign has an EstimatedCost attribute andAdvert has an EstimatedCost attribute. The purpose of the use case is to check that thetotal estimated cost of all the adverts is less thanthat for the campaign as a whole. ...Which objects are involved here?© 2004 John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 14CampaignAdvert*1containsClass diagramshowingaggregationCampaignCampaign and and AdvertAdvert© 2004 John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 15Campaign+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():MoneyThe The CampaignCampaign Class Class© 2004 John MylopoulosCSC340Information Systems Analysis and DesignSequence and Collaboration Diagrams -- 16Advert#Title:String#Type:String#TargetDate:Date#CompletedDate:Date+SetCompleted(CompletedDate:Date=Today)+GetTitle():String+GetType():String+GetTargetDate():Date+GetCompletedDate():Date#EstimatedCost:Money+GetCost():MoneyThe The AdvertAdvert Class


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?