Download presentation
Presentation is loading. Please wait.
Published byBuddy Miles Modified over 9 years ago
1
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 1 Use CasesUse Case Model Campaign Management PackageModelSub-system «subsystem»
2
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 2 Object flows –open arrow Objects –rectangle –optionally shows the state of the object in square brackets Record completion of a campaign :Campaign [Active] :Campaign [Completed]
3
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 3 Stereotypes Boundary objects model interaction between the system and actors (and other systems) Entity objects represent information and behaviour in the application domain Control objects co-ordinate and control other objects AddAvert Campaign User Interface::AddAdvertUI
4
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 4 User Interface::AddAdvertUI startInterface( ) assignStaff( ) selectClient( ) selectCampaign( ) > User Interface::AddAdvertUI startInterface( ) assignStaff( ) selectClient( ) selectCampaign( ) Campaign title campaignStartDate campaignFinishDate getCampaignAdverts( ) addNewAdvert( ) > Campaign title campaignStartDate campaignFinishDate getCampaignAdverts( ) addNewAdvert( ) AddAvert Control::AddAdvert showClientCampaigns( ) showCampaignAdverts( ) createNewAdvert( ) > Control::AddAdvert showClientCampaigns( ) showCampaignAdverts( ) createNewAdvert( )
5
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 5 FoodCo:Client Yellow Partridge:Client Soong Motor Co:Client Grace Chia:StaffMember Carlos Moncada:StaffMember A link is a logical connection between two objects
6
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 6 StaffMember staffName staffNo staffStartDate Client companyAddress companyEmail companyFax companyName companyTelephone liaises with staffContact Association role Association Association name Direction in which name should be read
7
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 7 StaffMember staffName staffNo staffStartDate Client companyAddress companyEmail companyFax companyName companyTelephone 1 0..* liaises with Multiplicities Exactly one staff member liaises with each client A staff member may liaise with zero, one or more clients
8
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 8 Operations describe what instances of a class can do: Set or reveal attribute values Perform calculations Send messages to other objects Create or destroy links Campaign actualCost campaignFinishDate campaignStartDate completionDate datePaid estimatedCost title checkCampaignBudget ( ) getCampaignContribution ( ) recordPayment ( ) setCompleted ( )
9
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 9 Campaign Manager Add a new advert to a campaign Advert setCompleted() createNewAdvert() > User Interface::AddAdvertUI startInterface() createNewAdvert() selectClient() selectCampaign() > Campaign title campaignStartDate campaignFinishDate getCampaignAdverts() addNewAdvert() > 10..* conducted by Client companyAddress companyName companyTelephone companyFax companyEmail getClientCampaigns() getClients() > 10..* places Control::AddAdvert showClientCampaigns() showCampaignAdverts() createNewAdvert() > 1 3 4 Add a new advert to a campaign :Advert :Campaign :Clien t :AddAdver t :AddAdvert UI 2 3.1.1: listCampaigns 3.1.1.1 *[For all client’s campaigns]: getCampaignDetails 5.1.1.1: Advert 4.1.1.1 *[For all campaign’s adverts]: getAdvertDetails :AddAdvertUI :AddAdvert :Client :Campaign :Advert 3.1: showClientCampaigns 3: selectClient 4: selectCampaign 4.1: showCampaignAdverts 5: createNewAdvert 5.1: addNewAdvert newAd:Advert 2: startInterface 1 *[For all clients]: getClient :CampaignManager sd Add a new advert to a campaign 5.1.1: addNewAdvert 4.1.1: listAdverts There is a clear development path in realizing a use case… First, as a collaboration of possible classes that together could deliver the necessary functionality…. Second, as a communication diagram that shows how those classes might interact…. Finally, as a class diagram that shows how the classes could be specified and associated with each other.
10
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 10 Class Name Client ResponsibilitiesCollaborations Provide client information. Campaign provides campaign details. Class Name Campaign ResponsibilitiesCollaborations Provide campaign information. Provide list of adverts. Add a new advert. Advert provides advert details. Advert constructs new object. Class Name Advert ResponsibilitiesCollaborations Provide advert details. Construct adverts. Provide list of campaigns. Example CRC cards
11
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 11 Class Student 0..*1..* Meal Ingredient 1..*1 Filled diamond signifies composition Aggregation (clearly not composition)
12
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 12 calculateBonus ( ) StaffMember {abstract} staffName staffNo staffStartDate calculateBonus ( ) assignNewStaffGrade ( ) getStaffDetails ( ) CreativeStaff qualification assignStaffContact ( ) AdminStaff calculateBonus ( ) Add generalisation structures when: Two classes are similar in most details, but differ in some respects May differ: In behaviour (operations or methods) In data (attributes) In associations with other classes
13
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 13 Components = replaceable part of a system (e.g. executable software module with well- defined interface and identity ) «interface» Allocate Seats GetFreeSeats(seatType) AllocateSeat(seatRef) DeallocateSeat(seatRef) Flight Management «component» «realize»
14
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 14 A pattern “describes a problem which occurs over and over again in our environment, and then describes the core of a solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice.” A lexander et al. (1977) Transaction transactionNumber transactionDate transactionTotal updateTransactionTotal ( ) TransactionLineItem TransactionLineNumber transactionLineQuantity transactionLineValue comprises *1 Simple Analysis Pattern
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.