Date post: | 12-Apr-2017 |
Category: |
Education |
Upload: | hemant-sharma |
View: | 242 times |
Download: | 0 times |
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
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
Example of E-homework Use Case diagram
E-homeworkdistributionTeacher Students
E-homeworksubmission
E-homeworkgrading
Relationships in Use Case Model
In UML, there are three kinds of relationships between use cases :
Include RelationshipExtend RelationshipGeneralization Relationship
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>>
Example of Include Relationship
<<include>>withdraw Input
amount
Cancel transaction
<<include>>
customer
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>>
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.
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 :-
Example of Generalization Relationship
Account
Current Account
Savings Account
customer
Example of Use Case Diagram
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
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!
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.
Example of Sequence Diagram
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.
Activity Diagram Notation
Activity1() Activity2()
1. Activities
2. Transition
Activity Diagram Notation
Activity1()
[x>0]
[x=0][x<0]
[x>0]
[x=0]
[x<0]
3. Decision Diamond
Activity Diagram Notation
4. Join Bar 5. Fork Bar
6. Start Marker 7. Stop Marker
Activity Diagram Notation
Developers Testers Markers
Swimlane SwimlaneSwimlane
8. Swimlane
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]
Collaboration Diagram Collaboration diagrams (called Communication diagrams)
depict scenarios as flows of messages between objects:
Example of Collaboration Diagram
Collaboration Diagram of Library Management.
Thank YouThe End.