TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
Interaction Modeling
1.
2. 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 diagram
Sequence diagram
Activity diagram
Collaboration diagram
3. 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
4. Example of E-homework Use Case diagram
E-homework
distributionTeacher Students
E-homework
submission
E-homework
grading
5. Relationships in Use Case Model
In UML, there are three kinds of relationships between
use cases :
Include Relationship
Extend Relationship
Generalization Relationship
6. 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>>
7. Example of Include Relationship
<<include>>
withdraw
Input
amount
Cancel
transaction
<<include>>
customer
8. 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>>
9. Example of Extend Relationship
Connection
down
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.
10. 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 :-
13. 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 :
Scenario
Sequence diagram
14. 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!
15. 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.
17. 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.
22. Activity Diagram of Library
Member Librarian
[borrower]
[returner]
Find book on shelf
Wait in queue
Prepare for next
member
Record borrowing
Record return
Put book back
on shelf
[returning]
[borrowing]