Chapter 5
Chapter 5
Chapter 5
3
Basic Object Diagram Symbols and
Notations
Object names
Each object is represented as a rectangle,
which contains the name of the object and its
class underlined and separated by a colon.
4
How to draw Object Diagram?
5
Contd.
6
Contd.
9
Contd.
12
Contd.
13
Contd.
14
How to draw Component Diagram?
16
Component Notation
17
Contd.
18
Contd.
19
UML Use Case Diagram
22
Use Case name
support a goal.
• Each sequence represent an interaction of actors
with the system. 23
Specifying the Behavior of a Use Case
• Describing the flow of events within the use
case.
• Can be done in natural language, formal
language or pseudo-code.
• Includes: how and when the use case starts
and ends; when the use case interacts with
actors and what objects are exchanged; the
ניתוח מערכות מידע
26
Contd.
27
Contd.
28
Contd.
29
How to draw Use Case Diagram?
31
Use-Case Diagrams (POST)
Buy Item
Log In
Cashier Customer
Refund a Purchased Item
32
Relationships between Use Cases
A communicates relationship between an
actor and a use case indicates that the actor
initiates the use case. An actor may initiate
one or more use cases.
1. Generalization - use cases that are specialized
versions of other use cases.
2. Include - use cases that are included as parts
of other use cases. Enable to factor common
ניתוח מערכות מידע
behavior.
3. Extend - use cases that extend the behavior of
other core use cases. Enable to factor variants.
33
1. Generalization
• A generalization relationship between
actors or use cases indicates that one actor
parent
or use case (the child) inherits the
characteristics of another actor or use case
(the parent). The child actor may initiate all
of the use cases that the parent can initiate.
• The child use case inherits the
child
behavior and meaning of the
ניתוח מערכות מידע
non-graduate graduate
ניתוח מערכות מידע
registration registration
35
Relationships between Actors
• Generalization.
student
ניתוח מערכות מידע
graduate non-graduate
student student
36
2. Include
updating
grades <<include>>
verifying
student id
ניתוח מערכות מידע
output <<include>>
generating
39
Extends relationship
case.
41
Contd. Extend
• Enables to model optional behavior or
branching under conditions.
<<extend>> Exam-grade
Exam copy
request appeal
ניתוח מערכות מידע
42
Example
place
place <<extend>>
conference
phone call
call
cellular
network receive
receive <<extend>>
additional
phone call
call
ניתוח מערכות מידע
use
user scheduler
Cellular Telephone
43
ניתוח מערכות מידע
Example
44
Exercise- Money Withdraw
• Use Case: Withdraw Money
• Purpose: To withdraw some cash from user’s bank
account
• Overview: The use case starts when the customer inserts
his credit card into the system. The system requests the
user PIN. The system validates the PIN. If the validation
succeeded, the customer can choose the withdraw
operation else alternative 1 – validation failure is
executed. The customer enters the amount of cash to
withdraw. The system checks the amount of cash in the
user account, its credit limit. If the withdraw amount in
ניתוח מערכות מידע
2. Customer inserts a Credit card into ATM 3. System verifies the customer ID and status
account
47