1 / 27

Object Collaboration

Object Collaboration. Happy path. Sales Clerk. System. 1. Fill in retailer’s number. 2. Show retailer’s details. ** Set up a new order. 3. Inputs design number. 4. Retrieve and display garment price, size range and description. 5. Input design no, quantity and size.

lorna
Télécharger la présentation

Object Collaboration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Object Collaboration

  2. Happy path Sales Clerk System 1. Fill in retailer’s number 2. Show retailer’s details. ** Set up a new order. 3. Inputs design number 4. Retrieve and display garment price, size range and description 5. Input design no, quantity and size 6. Write order line with order no, design no, quantity and size. Write ‘quantity’ new instances of garment with status ‘not started’. Display accumulated price. Display new set of orderliness. 7. Indicate finished 8. Enable ‘confirm order’ button. 9. Order confirmed 10. Order saved. ** New retailer is now an alternate path!

  3. Elaborate Steps 1 & 2 • Control class RegisterNewOrder displays OrderUI. • Sales clerk responds • Uses OrderUI to enter the retailer’s number • System responds: • RecordOrder requests retailer info from Retailer. • If successful, • requests constructor on order, giving retailer number and waiting for order number in response.

  4. Signals to OrderUI to display order number and value. • Sales clerk responds • Clicks AddLine on OrderUI • RecordOrder displays DesignUI • Sales Clerk responds • Enters Design number • RecordOrder requests design info from Design. • If successful, • Sends info to DesignUI • DesignUI • displays info • Waits for size and quantity • enables buttons. • Awaits confirmation…

  5. Continue building… • Invent your classes as you go.

  6. Messages…

  7. …Messages…

  8. …Messages

  9. Collaboration Diagram • Is another illustration of the interaction between objects during a Use Case. • Classes are shown as icons on the diagram. • Classes that collaborate are linked. • The links are populated with messages, showing the operation that the sender invokes on the recipient.

  10. Making a Collaboration diagram • Identify the objects involved • Sales Clerk, OrderUI, RegisterNewOrder, Retailer, Retailer Order, Retailer Order Line, DesignUI, Design. • Arrange them in layers. • Link all objects that communicate with each other. • Add the messages.

  11. The objects added to the diagram

  12. The objects as icons, in layers

  13. The objects communicating

  14. Collaboration Diagram

  15. Adding the garment class

  16. Messages…

  17. …Messages…

  18. …Messages * This version omits the creation of garment instances – see later

  19. …Messages

  20. Refining the OCD • 2. Separate out reusable functionality into another control class. • There are a group of messages that only use the DesignUI boundary class and the Design entity. • Introduce a new control class called OrderDesign. • The main control class invokes OrderDesign. • OrderDesign acts as ‘go-between’ between the DesignUI and the Design entity. • When all functionality relating to picking a quantity of a particular design has been completed, OrderDesign hands control back to RegisterNewOrder.

  21. Contained functionality

  22. Make all the messages in a happy path step be increments of the step. • To do this, you need to • Check the model properties to ensure that hierarchical numbering is enabled on diagrams. • Create the Sequence diagram from the OCD. • Move the messages so that they originate in the lifeline that has been created by the previous message in the group.

  23. Messages…

  24. …Messages…

  25. …Messages * This version omits the creation of garment instances – see later

  26. …Messages…

More Related