+ All Categories
Home > Education > Interaction Modeling

Interaction Modeling

Date post: 12-Apr-2017
Category:
Upload: hemant-sharma
View: 242 times
Download: 0 times
Share this document with a friend
25
Transcript
Page 1: Interaction Modeling
Page 2: Interaction Modeling

Interaction Modeling

Interaction modeling describes how the different elements in an object model interact with each other. The term interacted is a set of exchanged messages between the objects.

The interaction model uses :-Use case diagramSequence diagramActivity diagramCollaboration diagram

Page 3: Interaction Modeling

Use Case diagram A UML diagram that represents the relationship between actors and

use cases, and among the use cases. Represents an “architectural” view of the requirements. Actors :-

External entities (e.g., user role, another system) Relationship between actors and use cases :-

Initiation Communication

Relationship among different use cases :- Enables the decomposition of complex use cases into smaller

ones

Page 4: Interaction Modeling

Example of E-homework Use Case diagram

E-homeworkdistributionTeacher Students

E-homeworksubmission

E-homeworkgrading

Page 5: Interaction Modeling

Relationships in Use Case Model

In UML, there are three kinds of relationships between use cases :

Include RelationshipExtend RelationshipGeneralization Relationship

Page 6: Interaction Modeling

Include Relationship Use case A includes use case B if the flow of events for A contains the

flow of events for B A whole-part relationship Allow use case A to access another common use case B In use case description

At a particular point during the flow of events Mention the inclusion at that point

At any point in the flow of events Mention the inclusion in the quality requirement

In the use case diagram <<include>>

Page 7: Interaction Modeling

Example of Include Relationship

<<include>>withdraw Input

amount

Cancel transaction

<<include>>

customer

Page 8: Interaction Modeling

Extend Relationship A use case A extends a use case B if the flow of events in A can occur

amid the flow of events in B when certain condition is true It is like an “interrupt” It is used to separate the exceptional behavior from the normal behavior Use case description

Mentioned extension in the entry condition in the extending use case Specifying the condition that would trigger the extending use case

Use case diagram<<extend>>

Page 9: Interaction Modeling

Example of Extend Relationship

Connectiondown

Deposit

withdraw

<<extend>>

<<extend>>

Name: connection down…Entry condition: This use case extends the Deposit and withdraw use case. It is initialized by the system whenever the connection between the customer and the central sever is lost.

Page 10: Interaction Modeling

Generalization Relationship It is a parent-child relationship between two or more use cause. It is a kind of relationship in which the properties of the parent

use case are inherited by the child use case. It can be represented as a directed arrow with a triangle as an

arrow head, as shown below :-

Page 11: Interaction Modeling

Example of Generalization Relationship

Account

Current Account

Savings Account

customer

Page 12: Interaction Modeling

Example of Use Case Diagram

Page 13: Interaction Modeling

Sequence Model

Sequence Model represents the flow of system events, actions, and messages between the objects over a time period.

A sequence model is of two types :ScenarioSequence diagram

Page 14: Interaction Modeling

Scenario

A scenario is an instance of a use case showing a typical example of its execution.

Scenarios can be presented in UML using either sequence diagrams or collaboration diagrams.

Note that a scenario only describes an example of a use case, so conditionality cannot be expressed!

Page 15: Interaction Modeling

Sequence Diagram A sequence diagram

depicts a scenario by showing the interactions among a set of objects in temporal order.

Objects (not classes!) are shown as vertical bars. Events or message dispatches are shown as horizontal (or slanted) arrows from the sender to the receiver.

Page 16: Interaction Modeling

Example of Sequence Diagram

Page 17: Interaction Modeling

Activity Diagram

Describes how activities are coordinated. Is particularly useful when you know that an operation has to

achieve a number of different things, and you want to model what the essential dependencies between them are, before you decide in what order to do them.

Records the dependencies between activities, such as which things can happen in parallel and what must be finished before something else can start.

Represents the workflow of the process.

Page 18: Interaction Modeling

Activity Diagram Notation

Activity1() Activity2()

1. Activities

2. Transition

Page 19: Interaction Modeling

Activity Diagram Notation

Activity1()

[x>0]

[x=0][x<0]

[x>0]

[x=0]

[x<0]

3. Decision Diamond

Page 20: Interaction Modeling

Activity Diagram Notation

4. Join Bar 5. Fork Bar

6. Start Marker 7. Stop Marker

Page 21: Interaction Modeling

Activity Diagram Notation

Developers Testers Markers

Swimlane SwimlaneSwimlane

8. Swimlane

Page 22: Interaction Modeling

Activity Diagram of LibraryMember Librarian

[borrower]

[returner]

Find book on shelf

Wait in queue

Prepare for next member

Record borrowing

Record return Put book backon shelf

[returning]

[bor

rowi

ng]

Page 23: Interaction Modeling

Collaboration Diagram Collaboration diagrams (called Communication diagrams)

depict scenarios as flows of messages between objects:

Page 24: Interaction Modeling

Example of Collaboration Diagram

Collaboration Diagram of Library Management.

Page 25: Interaction Modeling

Thank YouThe End.


Recommended