admin管理员组

文章数量:1589809

Definition: OIDs show interaction in your use case. 

  • More formally, how to organize the object interaction that take place within your use case.
  • Define the rules of the objects that perform the event in that particular use case.

One OID per use case

2 types: Communication Diagrams & Sequence Diagram

When to use communication vs sequence?

  • Communication: if organization is required
  • Sequence: If there is a time sequence

Communication Diagram

  • Show relationship between the objects
  • Show how messages flow between the objects
  • Imply basic relationship (association) between classes
  • Use same sets of notations as sequence diagram

 Actor

External role that initiates use cases. Actor can both receive and send messages

Object

  • Initiated class object that carries out use cases
  • Objects can both receive and send messages
  • Notation -- :Object

Link

Connectors (lines) that illustrate the flow of messages

Message

Represent a request for service, from and to an object/actor.

Example

Sequence Diagram

  • Show interaction between the objects
  • Show the interaction order in a time sequence
  • Contains messages
  • Use same sets of notations as communication diagram

Object

  • Represent an object or a class
  • Only class name, not the attributes

 Lifeline

Definition: A vertical dotted line that indicates the passage of time.

  • The length of the lifeline depends on the time the particular object/actor exists
  • Can be extended from an actor or an object

Activation Box

Definition: A vertical rectangular box that indicates the time it takes for the object to complete a task.

  • The length of the activation box depends on the time it takes to finish the task

 Message

  • Similar to communication diagram messages, also represents requests from one actor or object to another to do some action
  • Message invokes a particular method (these methods must be in the Class diagram)
  • Messages are pseudocode

Message Name & Format

Naming -- Verb+Noun

  • Message with no param

    • e.g. RingTelephone

  • Message require unspecified param

    • e.g. ItemInquiry()

  • Message require specific param

    • e.g. CreateOrderItem(ItemID, Qty)
  • Message triggers response
    • e.g. InventoryInfo := InventoryItemInquiry()
  • Message with guards
    • ​​​​​​​​​​​​​​e.g. [FirstItem] CreateOrder()​​​​​​​

      ​​​​​​​

本文标签: InteractionobjectOIDdiagram