CS551 Interaction Models (Chapter 4 of UML) - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

CS551 Interaction Models (Chapter 4 of UML)

Description:

Collaboration/Type ... A collaboration is a design for the way objects interact with one another to ... 'outside' the collaboration (generalize action ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 15
Provided by: frankm8
Learn more at: https://sse.umkc.edu
Category:

less

Transcript and Presenter's Notes

Title: CS551 Interaction Models (Chapter 4 of UML)


1
CS551 Interaction Models (Chapter 4 of UML)
  • Yugi Lee
  • STB 555
  • (816) 235-5932
  • yugi_at_cstp.umkc.edu
  • www.cstp.umkc.edu/yugi

2
Important Questions in OO Design
  • What should the system do?
  • type specification , putting it together.
  • What objects should be chosen?
  • type specification, modified by design patterns
    to improve decoupling.
  • Which object should do what, and how should the
    objects interact?
  • separate different concerns into different
    objects while balancing the needs of decoupling
    with performance.

3
Collaboration/Type
  • A type represents a specification of the behavior
    seen at an interface to an object.
  • A collaboration is a design for the way objects
    interact with one another to achieve a mutual
    goal.
  • a group of participating objects
  • what goes on inside a software component.
  • how actors interact with the component.
  • how real world objects interact with one another.

4
Joint Actions
  • Localized Actions operations
  • a one-sided specification of an action, focused
    entirely on a single object and how it responds
    to a request.
  • Joint Actions use-cases
  • abstract multiple interactions and specific
    protocols
  • the net effect on all participants and the
    summary of information exchanged
  • The interacting participants might be objects
    inside a program, people, or computers.

5
Action Type and Refinement
6
(No Transcript)
7
action Wholesaler sell (retailer Retailer,
item Item, out price ) pre
catalog.stock-gtincludes(item) -- this item was
part of our stock post price
item.product.price -- price returned to caller
and cash cash_at_pre price and
stock stock_at_pre item
8
Use Cases are Joint Actions
  • A joint action with multiple participant objects
    that represent a meaningful business task.
  • use case sale
  • participants retailer, wholesaler
  • parameters set of items
  • pre the items must be in stock,
  • retailer must be registered,
  • retailer must have cash to pay
  • post retailer has received items and paid cash
  • wholesaler has received cash and given
    items

9
Refinement of Use Cases
  • use case sale
  • .....
  • priority primary
  • concurrent many concurrent sales with different
    wholesaler reps no sale and return by the same
    retailer at the same time
  • refinement criteria -- what to consider when
    refining this use case into a sequence
  • frequency 300-500 per day
  • performance less than 3 minutes per sale
  • use case telephone sale by distributor
  • refines use case sale
  • 1. retailer calls wholesaler and is connected to
    rep
  • 2. rep gets distributor membership information
    from retailer
  • 3. rep collects order information from retailer,
    totaling the cost
  • 4. rep confirms items, total, and shipping date
    with wholesaler
  • 5. both parties hang up
  • 6. shipment arrives at retailer
  • 7. wholesaler invoices retailer
  • 8. retailer pays invoice
  • abstract result sale was effectively conducted
  • with amount of the order total and items as
    ordered

10
Concurrent Actions
  • operation action (retailer, wholesaler) supply
  • -- a condition maintained while an action
    occurrence is in progress.
  • guarantee retailer.stock-gtsize gt10
  • -- true throughout the action occurrence for all
    of this description to be applicable.
  • rely wholesaler.in_business

11
Sequence Diagrams with Actions
  • Action occurrence
  • an interaction between two particular points in
    time involving specific participant objects
    bringing about a change of state in some or all
    of them.
  • Sequence diagram
  • a graphical representation of action occurrences
  • a horizontal bar (with arrows or ellipses)
  • Starting from the initial state, each action
    occurrence in a scenario causes a state change.

12
(No Transcript)
13
Scenario
  • A scenario is a particular trace of action
    occurrences
  • scenario order fulfillment out of stock
  • initial state
  • retailer has no more items of product p1
  • wholesaler has no inventory of p1 either
  • steps
  • 1 retailer places an order for quantity q of p1
  • 2 wholesaler orders p1 from manufacturer m
  • 3 wholesaler receives shipment of p1 from m
  • 4 wholesaler ships q1 of p1 to retailer with
    invoice
  • 5 retailer pays wholesalers invoice

14
Collaboration Specification
  • A collaboration abstracts multiple participants
  • consider all the participants in an operation,
    because its outcome may affect and depend on all
    of them (defer the partitioning of responsibility
    when needed)
  • the list of actions between the collaborators
  • an optional list of actions considered outside
    the collaboration (generalize action occurrences
    to permit multiparty actions)
  • action specs (the pre and/or post spec of an
    action may reflect the change of state of all its
    participants)
  • static and effect invariants that may apply to
    either set of actions
  • an optional sequence constraint on the set of
    actions.
Write a Comment
User Comments (0)
About PowerShow.com