THU THẬP YÊU CẦU HƯỚNG ĐỐI TƯỢNG ppt

33 208 0
THU THẬP YÊU CẦU HƯỚNG ĐỐI TƯỢNG ppt

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Chương 3 THU THẬP YÊU CẦU HƯỚNG ĐỐI TƯỢNG (cont) Lược đồ cộng tác Lược đồ trình tự Lược đồ hoạt động Cơ chế truyền thông điệp của đối tượng UML :Book sam:Student getFineDue( )  Các đối tượng trao đổi thông tin thông qua cơ chế truyền thông điệp.  Gửi thông điệp getFineDue() đến đối tượng Student thực hiện cú pháp sau: fine = sam.getFineDue() Interaction (sự tương tác) & Collaboration  The structure of Instances playing roles in a behaviour and their relationships is called a Collaboration.  An Interaction is defined in the context of a Collaboration. It specifies the communication patterns between the roles in the Collaboration.  More precisely, it contains a set of partially ordered Messages, each specifying one communication,  e.g. what Signal to be sent or what Operation to be invoked, as well as the roles played by the sender and the receiver, respectively. Example Collaboration Diagrams 1.1: *getAccountDetails() :withdrawUI :withdrawCtrl :Card :Account 3: selectAccount() 4: getAmount() 4.1: withdraw() 2: startInterface() 1:listCampaigns() Campaign Manager Allocation of responsibilities for use case withdraw 4.1.1: withdraw() Sequence Diagrams  Show an interaction between objects arranged in a time sequence  Can be drawn at different levels of detail and to meet different purposes at several stages in the development life cycle  Typically used to represent the detailed object interaction that occurs for one use case or for one operation Sequence Diagrams  Vertical dimension shows time  Objects involved in interaction appear horizontally across the page and represented by lifelines  Messages are shown by a solid horizontal arrow  The execution of an operation is shown by an activation Sequence diagram with entity objects only :Card :Account listAccounts() withdraw() *getAccount Details( ) Object lifeline Activation Client Sequence diagram with entity objects only :Client :Campaign :Advert getName() listCampaigns() listAdverts() *getCampaign Details() Advert() *getAdvert Details() newAd:Advert addNewAdvert() Object lifeline Activation Object creation Campaign Manager Boundary & Control Classes *getAccountDetails() :withdrawUI :withdrawCtrl :Card :Account withdraw() selectAccount() withdraw() startInterface() listClient() Client Use Case: withdraw Boundary & Control Classes listCampaigns() *getCampaignDetails() Advert() *getAdvertDetails() addNewAdvert() :AddAdvertUI :AddAdvert :Client :Campaign :Advert showClientCampaigns() selectClient() selectCampaign() showCampaignAdverts() listAdverts() createNewAdvert() addNewAdvert() newAd:Advert startInterface() *getClient() Client Use Case: Add a new advert to a campaign . THU THẬP YÊU CẦU HƯỚNG ĐỐI TƯỢNG (cont) Lược đồ cộng tác Lược đồ trình tự Lược đồ hoạt động Cơ chế truyền thông điệp của đối tượng UML :Book sam:Student getFineDue( )  Các đối tượng. đổi thông tin thông qua cơ chế truyền thông điệp.  Gửi thông điệp getFineDue() đến đối tượng Student thực hiện cú pháp sau: fine = sam.getFineDue() Interaction (sự tương tác) &

Ngày đăng: 13/08/2014, 20:22

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan