Chapter Two
Chapter Two
CHAPTER TWO
UNIFIED MODELING
LANGUAGE (UML)
1
Thursday, April 4, 2024
WHAT IS UML:
2
THE UNIFIED MODELING LANGUAGE
(UML):
9
Thursday, April 4, 2024
USE CASE DIAGRAM - EXAMPLE:
sales company might follow these
steps :
Browse catalog and select items.
Call sales representative.
Supply shipping information.
Supply payment information.
Receive conformation number
from salesperson.
10
USE CASE DIAGRAM - EXAMPLE:
11
USE CASE DIAGRAM:
12
USE CASE DIAGRAM:
13
USE CASE DIAGRAM:
Generalizations: The child use case in the
generalization relationship has the underlying
business process meaning, but is an enhancement
of the parent use case. (directed arrow with a
triangle arrow head )
you can replace any occurrence of the
"Store patient records (paper file)" use
case in the business flow of your system
with the "Store patient records
(computerized file)" use case without
impacting any business flow.
14
CLASS DIAGRAM:
Class diagrams are widely used to describe the types
of objects in a system and their relationships
Name
Attributes
Operations
15
Thursday, April 4, 2024
CLASS DIAGRAM:
Modifiers are used to indicate visibility of attributes
and operations.
‘+’ is used to denote Public visibility (everyone)
‘#’ is used to denote Protected visibility (friends)
‘-’ is used to denote Private visibility (no one)
Account Name Name
- Customer_Name
- Balance
Attributes
+addFunds( ) Operations
+withDraw( )
+transfer( )
16
Thursday, April 4, 2024
CLASS DIAGRAM:
There are two kinds of Relationships
Generalization (parent-child relationship)
Association (student enrolls in course)
17
CLASS DIAGRAM:
Example:
Supertype Customer
Regular Loyalty
Customer Customer
Subtype1 Subtype2
19
CLASS DIAGRAM:
20
CLASS DIAGRAM:
21
INTERACTION DIAGRAMS:
Collaboration diagrams
Collaboration diagrams demonstrate how objects are
statically connected.
22
SEQUENCE DIAGRAM:
A B
Self-Call: A message that
Synchronous
an Object sends to itself.
condition is true.
[condition] remove()
Condition
*[for each] remove()
Iteration
Self-Call
23
SEQUENCE DIAGRAM:
Picks up
Dial tone
Dial
Picks up
Hello
24
Thursday, April 4, 2024
COLLABORATION DIAGRAMS:
Collaboration diagrams are equivalent to
sequence diagrams. All the features of
sequence diagrams are equally
applicable to collaboration diagrams
Use a sequence diagram when the
transfer of information is the focus of
attention
Use a collaboration diagram when
concentrating on the classes
25
Thursday, April 4, 2024
STATE DIAGRAM:
Billing Example:
State Diagrams show the sequences of states an
object goes through during its life cycle in response
to stimulin, together with its responses and actions;
Start End
Unpaid Paid
Invoice created payin Invoice destroying
g
26
Thursday, April 4, 2024
ACTIVITY DIAGRAM:
Activity diagrams describe the workflow behavior of a
system.
similar to state diagrams because activities are the
state of doing something
27
Thursday, April 4, 2024
28
ACTIVITY DIAGRAMS:
Object Diagrams
Format is
Instance name : Class name
Attributes and Values
Example:
OBJECT DIAGRAMS
Shows instances of Class Diagrams and links
among them
An object diagram is a snapshot of the objects in a
At a point in time
system
With a selected focus
31
COMPONENT DIAGRAM NOTATION:
32
Deployment Diagrams:
Shows the physical architecture of the hardware
and software of the deployed system
Nodes
Typically contain components or packages
Usually some kind of computational unit; e.g.
machine or device (physical or logical)
36