UML – Unified Modelling Language
UML was created by Object Management Group (OMG) and UML
1.0 specification draft was proposed to the OMG in January 1997.
Developed by Grady Booch, James Rumbaugh and Ivar Jacobson at
UML is different from the other common programming languages
like C++, Java, COBOL etc.
UML is a pictorial language used to make software blue prints.
UML is a standard language for specifying, visualizing,
constructing, and documenting the artifacts of software
A conceptual model can be defined as a model which is
made of concepts and their relationships.
UML building blocks
Rules to connect the building blocks
Common mechanisms of UML
Use case diagram
Class represents set of objects
having similar responsibilities
Interface defines a set of
operations which specify the
responsibility of a class.
interaction between elements
The Structural things define the static part of the model. They
represent physical and conceptual elements.
Structure name Notation
Structure name Notation
Use case represents a set of
actions performed by a system for a
Component describes physical
part of a system.
A node can be defined as a physical
element that exists at run time
A behavioral thing consists of the dynamic parts of UML models.
Structure name Notation
Interaction is defined as a
behavior that consists of a group of
messages exchanged among elements
to accomplish a specific task. Eg:
A behavior that specifies the
sequences of states an object goes
through during its' lifetime in response
Grouping things can be defined as a
mechanism to group elements of a
UML model together.
Package is the only one grouping
thing available for gathering structural
and behavioral things.
Annotational things can
be defined as a mechanism to capture
remarks, descriptions, and comments
of UML model elements
A note is used to render
comments, constraints etc of an
Relationship is another most important building block of UML. It shows how
elements are associated with each other and this association describes the
functionality of an application.
Dependency is a relationship
between two things in which
change in one element also affects
the other one.
Association is basically a set of links
that connects elements of an UML
model. It also describes how many
objects are taking part in that
Generalization can be defined as a
relationship which connects a
specialized element with a
generalized element. It basically
describes inheritance relationship
in the world of objects.
Realization can be defined as a
relationship in which two elements
are connected. One element
describes some responsibility
which is not implemented and the
other one implements them. This
relationship exists in case of
There are two broad categories of diagrams:
The structural diagrams represent the static aspect of the
These static aspects represent those parts of a diagram
which forms the main structure and therefore stable.
Class diagram is a static diagram which
represents a static view of an application.
Class diagram explains about the attributes ,
operations and constraints of the system.
The class diagram shows a collection of
classes, interfaces, associations,
collaborations and constraints. It is also
known as a structural diagram.
Class diagram name should
be meaningful to describe
the aspects of the system.
Identify the element and
Identify the responsibility of
Specify the minimum
number of properties.
Make notes to describe the
some aspects of the
Final version to be drawn
on white paper.
Component diagrams are used to model physical aspects of a
Physical aspects are the elements like executables, libraries,
files, documents etc which resides in a node.
Component diagrams represent a set of components and their
relationships. These components consist of classes, interfaces
Component diagrams are used to visualize the organization
and relationships among components in a system. These
diagrams are also used to make executable systems
To draw a component diagram the
following artifacts are to be identified
Files used in the system.
Libraries and other artifacts
relevant to the application.
Relationships among the
Use a meaningful name to
identify the component for which the
diagram is to be drawn.
Prepare a mental layout before
producing using tools.
Use notes for clarifying
Object diagrams are derived from class diagrams
Object diagrams can be described as an instance of
Object diagrams are a set of objects and their
relationships just like class diagrams and also
represent the static view of the system.
Object diagram represents an instance at a particular
This diagram is an instance of
the system at a time of
Objects identified are customer,
order, Special order and normal
The customer object (C) is
associated with three order
objects (O1, O2 and O3). These
order objects are associated
with special order and normal
order objects (S1, S2 and N1).
The customer is having the
following three orders with
different numbers (12, 32 and
40) for the particular time.
Deployment diagrams are a set of nodes and their
relationships. These nodes are physical entities where the
components are deployed.
Deployment diagrams are used for visualizing deployment
view of a system. This is generally used by the deployment
A deployment diagram consists of nodes. Nodes are nothing
but physical hardwares used to deploy the application.
Before drawing a deployment diagram
the following artifacts should be
Relationships among nodes
Here we have shown nodes as:
The application is assumed to be a web
based application which is deployed in
a clustered environment using server
1, server 2 and server 3. The user is
connecting to the application using
internet. The control is flowing from
the caching server to the clustered
Represents the dynamic aspects
Help visualize , specify and construct and
document the dynamic aspects of a software.
Dynamic aspects like use case, interaction,
state chart, activity.
• Use Case Diagram – high-level behaviors of the system,
user goals, external entities: actors
• Sequence Diagram – focus on time ordering of messages
• Collaboration Diagram – focus on structural
organization of objects and messages
• State Chart Diagram – event driven state changes of
• Activity Diagram – flow of control between activities
Use case diagrams present an outside view of the
manner the elements in a system behave and how they
can be used in the context.
Use case diagrams comprise of: Use cases, Actors,
Relationships like dependency, generalization, and
Uses: To model the context of a system by enclosing
all the activities of a system within a rectangle and
focusing on the actors outside the system by
interacting with it.
i.e. To model the requirements of a system from the
outside point of view.
• Use case captures some
• Granularity of functionality
depends on the level of
detail in your model
• Each use case achieves a
discrete goal for the user
• Use Cases are generated
• Actors have a name.
• An actor is a set of roles
that users of use cases play
when interacting with the
• They are external entities
• They may be external an
system or DB
Let us consider an Automated Trading System.
We assume the following features of the system:
The trading has transactions with two types of
customers, individual customers and corporate
Once the customer places an order, it is processed
by the sales department and the customer is given
The system allows the manager to manage
customer accounts and answer any queries posted
by the customer.
Main purpose of the interaction diagram is to
visualize the interactive behavior of the system.
Messages exchanged between these objects will
be specified in the diagram itself.
There are two types of interaction diagrams.
Sequence diagram is an interaction diagram.
Sequence diagrams are interaction diagrams
that illustrate the ordering of messages
according to time
Sequence diagrams represent the objects
which are participating in the interaction
horizontally and time vertically.
Collaboration diagram is another form of
Collaboration diagrams are interaction
diagrams that illustrate the structure of the
objects that send and receive messages.
Structural organization consists of objects
A state–chart diagram shows a state machine that
depicts the control flow of an object from one
state to another.
A state machine portrays the sequences of states
which an object undergoes due to events and
their responses to events.
State–Chart Diagrams comprise of:
-States: Simple or Composite
-Transitions between states
-Events causing transitions
-Actions due to the events
Used for: State-chart diagrams are used for
modeling objects which are reactive in nature.
Consider – ORDER as an Object and trace its
An activity diagram depicts the flow of
activities which are ongoing operations in a
Activity diagram describes the flow of control
in a system. So it consists of activities and
Activity diagram is basically a flow chart to
represent the flow form one activity to
another activity. The activity can be described
as an operation of the system.
Following elements to
be identified before
drawing an activity
Three type of UMLmodelling:
Structural,Behavioural and Architectural
Structural Modelling capture the static
features of the system.
Structural model represents the
framework for the system.
This framework is the place where all
other components exist.
They all represent the elements and the
mechanism to assemble them.
It never describes about the dynamic
behaviour of the system.
Class diagram is the most widely used
1. Classes diagrams
2. Objects diagrams
3. Package diagrams
5. Composite structure
6. Component diagram
Behavioral model describes the interaction in the system.
It represents the interaction among the structural
It shows the dynamic nature of the system.
They consists of the following:
3.Use case diagrams
All the above show the dynamic sequence of flow in a
Architectural model represents the overall
framework of the system.
It contains both structural and behavioral
elements of the system.
It can be defined as the blueprint of the entire
Package diagram comes under architectural