Interaction modeling - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Interaction modeling

Description:

... KEY is send to the receptionist. The visitor receives a VISITORS ... COLLECT KEY is send to the receptionist. The visitor returns the key the visitors card. ... – PowerPoint PPT presentation

Number of Views:1055
Avg rating:3.0/5.0
Slides: 21
Provided by: Staffordsh75
Category:

less

Transcript and Presenter's Notes

Title: Interaction modeling


1
Interaction modeling
  • Object Interaction is dynamic behaviour modeling
  • It is used to show the interactions which occur
    between the static Class Diagram and the Use
    Cases
  • This integration of the users view (Use Case
    model) and the developers view(Class Diagram) is
    used to cross check the requirements of the system

2
Interaction modeling
  • As we have seen and used.
  • The Class Diagram for a problem defines the
    internal structure of the objects (by defining
    the class content) but does not show how the
    objects will interact
  • Use Cases depict the processes without concern
    for the internal composition of the processes
  • Interaction modeling increases the chances of the
    system achieving what the user wanted

3
Interaction modeling
  • Object interaction modeling involves two types of
    modeling diagram derived from Use Cases
  • Object Sequence Diagram(OSDs)
  • Object Collaboration Diagram(OCDS)
  • Use the Together booklet to see how to draw them

4
Sequence Diagram
  • Illustrate how objects interact with each other
  • Focus on message sequence

5
Object Sequence Diagram
  • The Object Sequence Diagram(OSD) represents a
    graphic description of a Use Case
  • Constructs of sequence, selection and iteration
  • passage of time also depicted on the diagram

6
Hotel Example - Use-case view
  • Hotel UCD

7
Hotel Example - Use Cases
  • Check_in use case
  • This use case begins when a visitor enters the
    hotel.
  • The system checks if the visitor had booked a
    room.
  • If yes then the S1. If not the system checks if
    there are free rooms. If yes the room is reserved
    for the visitor and the S1. If not the case is
    finished with the message - NO Vacancies.
  • S1. Room is allocated to the visitor. Message
    GIVE KEY is send to the receptionist. The visitor
    receives a VISITORS CARD.
  • Check_out use case
  • This use case begins when a visitor arrives at
    the reception desk in order to check out the
    hotel.
  • The system calculates the bill. The visitor pays.
    The system sends a message to the cleaner to
    clean up the left room. COLLECT KEY is send to
    the receptionist. The visitor returns the key the
    visitors card.

8
Hotel Example - Class Diagram
Hotel
available (r Room)
1
1
guests
Room
Cleaner


HotelGuest
size Number
pay Money
clean Bool
leave ()
clean (r Room)
9
Hotel Example - Class diagram
  • Persons involved

10
Hotel Example - State Diagram
  • Room class

11
Hotel Example - Sequence Diagram
12
Sequence Diagram
  • Purpose
  • capture the behaviour of a single use case -
    how messages are sent within a use case
  • show how objects interact with each other - show
    how they send and receive messages
  • focus on time
  • Syntax
  • object
  • time
  • message
  • Forms
  • generic - all possible alternative scenarios
  • instance - one scenario, no conditions, branches,
    loops

13
Sequence Diagram
  • Example

14
Messages
  • Message
  • a communication between objects that conveys
    information
  • has a render and recipient
  • is represented as an arrow denoting flow of
    control

15
Sequence Diagram
  • Types of messages
  • simple
  • flat flow of control - control is passed without
    describing any details
  • synchronous
  • nested flow of control - operation call
  • handling of the message is completed before the
    caller resumes execution
  • asynchronous
  • there is no explicit return to the caller
  • the sender continues to execute after sending the
    message without waiting for it to be handled

16
Sequence Diagram
  • Activation
  • time during which object performs an action
    either directly or through another object
    (subcontractor)
  • Return
  • implicit
  • explicit

17
Sequence Diagram
  • Conditional branch
  • Loop

18
Sequence Diagrams
  • Textual notes
  • Time constrains

19
Sequence Diagram
  • Conditional branch
  • Loop

20
Tutorial - To create OSDs
  • Using the Video Shop scenario
  • Choose a use case such as Borrow a book
  • Create a New Sequence Diagram for this use case
Write a Comment
User Comments (0)
About PowerShow.com