UNIFIED MODELLING
LANGUAGE (UML)
Dr Adel Taweel
UML: Unified Modelling Language
Objectives
To explain unified modelling language as object
modelling tools.
To describe
Different
types of UML diagrams
UML modelling techniques/tools and their use
Grady Booch,
Ivar Jacobson,
and Jim Rumbaugh historically and
fondly known in the UML community
as The Three Amigos are often
credited with the dominant
contribution to the Unified Modeling
Language
Dr Adel Taweel 2014
Software Engineering
8
UML History
9
UML
UML Diagrams
Class Diagram
Shows a collection of static model elements such as classes and types,
their contents, and their relationships
Component Diagram
Depicts the components that compose an application, system, or
enterprise. The components, their interrelationships, interactions,
and their public interfaces are depicted
Deployment Diagram
Shows the execution architecture of systems. This includes nodes,
either hardware or software execution environments, as well as the
middleware connecting them
Object Diagram
Depicts objects and their relationships at a point in time, typically a
special case of either a class diagram or a communication diagram
Dr Adel Taweel 2014
Software Engineering
14
Summary of UML Diagrams (2): Dynamic
Activity Diagram
Depicts high-level business processes, including data flow, or to model
the logic of complex logic within a system
Sequence Diagram
Models the sequential logic, in effect the time ordering of messages
between classifiers
Communication/Collaboration Diagram
Shows instances of classes, their interrelationships, and the message
flow between them. Communication diagrams typically focus on the
structural organization of objects that send and receive messages.
Formerly called a Collaboration Diagram
State (Machine) Diagrams Behavioral and Protocol
Describes the states an object or interaction may be in, as well as the
transitions between states. Formerly referred to as a state diagram,
state chart diagram, or a state-transition diagram. A behavioral state
machine examines the behavior of a class; a protocol state machine
illustrates the dependencies among the different interfaces of a class
Dr Adel Taweel 2014
Software Engineering
15
Some UML Diagrams
16
Example:
BookBorrower: This actor represents some one that make
use of the library for borrowing books
Dr Adel Taweel 2014
Software Engineering
21
Exercise!
22
Borrow Copy
of a book
Borrow Copy
of a book
Example:
Use case: Borrow copy of book
A book borrower presents a book. The system checks that the
potential borrower is a member of the library & s/he does
not have the maximum number of books.
Transfer data
Register Export
patient statistics
View Manager
personal info. Generate
Medical receptionist
report
View record
Nurse
Doctor
Edit record
Setup
consultation
Register
patient
Unregister
patient
View patient
info.
Medical
receptionist
Transfer data
Contact
patient
or you can explain particular scenario i.e. particular instances of use would
be differente.g. morning after the party Sarah goes to the recycling with three
crates containing ....
separate sub-cases
Use <<include>>
How the system can reuse pre-existing component
To show common functionality between use cases
To develop the fact that project from existing components!
Doctor
Hospital General
doctor practitioner
Trainee Qualified
doctor doctor
Doctor
Name
Phone #
Email
register ( )
de-register ( )
Staff # Practice
Pager # Address
Scenario 1
BookBorrower Joe B borrows the librarys only
copy of Using UML, when he has no other book
on loan. The system is updated accordingly.
Scenario 2
BookBorrower Ann tries to borrow the librarys
second copy of Software Engineering, but is
refused because she has six books out on loan,
which is her maximum allowance.
1 1 Patient
Patient record
Consultation
Doctors
Date
Time
Clinic
Reason
Medication prescribed
Treatment prescribed
Voice notes
Transcript
...
New ( )
Prescribe ( )
RecordNotes ( )
Transcribe ( )
...
Patient record
1 1
1 1..*
Patient Consultation
Specify snapshots
Medical Receptionist
ViewInfo (PID)
report (Info, PID,
UID)
authorize (Info,
UID)
authorization
alt
[authorization OK] Patient info
login ( )
ok
alt
[sendInfo]
updateInfo( ) updatePRS (UID )
authorize (TF, UID)
authorization
update (PID)
update OK
Message (OK)
[sendSummary]
UpdateSummary( )
summarize (UID )
authorize (TF, UID)
authorization
:summary
update (PID)
update OK
Message (OK)
logout ( )
Means
If balance<0, then change the state to overdrawn
If balance>=0, then change the state to Incredit
Important hint:
For expressing some events use keywords like
Important hint:
For expressing some events use keywords like
The ports and connectors specify how component interfaces are mapped to
internal functionality
Note that these connectors are rather limited, special cases of the ones in
software architectures
In deployment diagram, an
association represents a
communication path
between nodes. The
following diagram shows a
deployment diagram for a
network, depicting network
protocols as stereotypes,
and multiplicities at the
association ends.