2. WHAT IS UML ?WHAT IS UML ?
• Unified Modeling Language is a modeling
language for software blueprint.
• It is a standard language for specifying,
visualizing, constructing, and documenting the
artifacts of software systems.
• It was developed by Booch, Jacobson and
Rumbaugh.
3. WHAT UML IS NOT ?WHAT UML IS NOT ?
• It’s not an algorithm specification language..
• It’s not a development process.It’s not a development process.
• It’s not a programming language.It’s not a programming language.
• It’s not a caseIt’s not a case tool.tool.
4. GOALS OF UMLGOALS OF UML
• Provide users with a ready-to-use,
expressive visual modeling language
so they can develop meaningful model.
• Provide extensible and specialization
mechanisms to extend the core concept.
• Be independent of programming language and
development processes.
5. TYPES OF UML DIAGRAMSTYPES OF UML DIAGRAMS
Each UML diagram is designed to let
developers and customers view a software
system from a different perspective.
1. Use Case Diagram : Displays the
relationship among actors and use cases.
2. Class Diagram : Models class structure and
contents using design elements such as
classes, packages and objects. It displays
relationships such as inheritance and
associations etc.
6. 3. Interaction Diagram :
Sequence Diagram : Displays the time
sequence of the objects participating in the
interaction.
Collaboration Diagram : Displays an
interaction organized around the objects
and their links to one another.
4. Statechart Diagram : Displays the sequences
of states that an object of an interaction goes
through during its life in response to received
stimuli/event.
7. 5. Activity Diagram : Displays a special state
diagram where most of the states are action
states and most of the transitions are triggered
by completion of the actions in the source
states. In this diagram
Focus is on flows driven by processing.
6. Physical Diagrams :
Component Diagram : Shows the
organization and dependencies among a set
of components. Involves the modeling of
physical things that reside on a node – such
as executables, libraries, tables, files and
documents.
8. Deployment Diagram : Displays the
configuration of run-time processing
elements and the software components,
processes and objects that live on them.
10. • Use Case View : It describes the behavior of
the system typically as seen by the end user.
• Design View : It encompasses the classes,
interfaces and collaborations that make up the
system. Shows how functional requirement
have been implemented.
• Process View : It encompasses the threads and
processes that make up the system.
11. • Implementation View : It encompasses the
components, files and packages that are used
to assemble the system.
• Deployment View : It encompasses nodes that
form the system and addresses the
distributivity and installation of system.
12. ELEMENTS OR THINGS OF UMLELEMENTS OR THINGS OF UML
Many elements or things that must be well
understood to draw UML diagrams are broken
down into following categories :
• Structural Elements
• Behavioral Elements
• Grouping Elements
• Annotations
13. • STRUCTURAL ELEMENTS :
They are the static parts of the model usually
represents the static concepts or physical
entities with system.
Classes
Interfaces
Collaboration
Use case
Active classes
Components
Nodes
14. • BEHAVIORAL ELEMENT :
These are the dynamic parts of the model.
They represent the behaviour of the static
elements of the model.
Messages : Represents messages
exchanged between objects and represents
flow of the system.
States : Represents the state of an object at
a particular point in time. States allow
objects to make choices about how to
respond to an event.
15. • ANNOTATION ELEMENTS:
These are explanatory elements of the UML.
These are used to describe other things
represented by a single element.
Note
16. RELATIONSHIPS IN UMLRELATIONSHIPS IN UML
There are 4 types of relationships :
1. Dependency
2. Association
3. Generalization
4. Realization
17. 0..1 *
employer employee
• DEPENDENCY :
It is a semantic relationship between two things
that represents that a change to the independent
element will affect the dependent element.
-------
• ASSOCIATION :
It represents a structural relationship (usually
among the classes). It has name, multiplicity,
source and target, role names.
18. • GENERALIZATION :
It indicates specialized element is substitutable
For a generalized element. It represents is-a kind
Of relationship.
• REALIZATION :
It is a semantic relationship that specifies a
contract between a specifier and a provider. It
exist only between interfaces and classes or
components and use cases and collaboration.
----------|
19. COMMON MECHANISMSCOMMON MECHANISMS
1. NOTES : A note is a graphical symbol for
rendering constraints or comments attached to
a element.
2.STEREOTYPES : Allows to create new
kind of building blocks similar to existing
ones but specific to our problem
<<exception>
Underflow
20. 3. TAGGED VALUES :Tagged value is
denoted by (name, value) pair that describes the
property of a model element.
Server
{Processor = 3}
21. 4. CONSTRAINTS : Graphically, a
Constraint is rendered as a string enclosed by
Brackets and placed near the associated element.
Portfolio
Bank Account
{secure} Corporation
Person
Gender :{male , female}
{or}
22. USE CASE DIAGRAMUSE CASE DIAGRAM
• A use case diagram specifies the behavior of a
system or a part of a system and is a
description of a set of sequences of actions.
• Components of Use Case Model :
Actor
Use Case
23. • Relationships in Use Case Model :
communicates Relationship :
<<communicates>> Use Case
uses or includes Relationship :
Place order Validate Customer
extends Relationship:
Base usecase
Place order
Overdraw amount<<uses>> <<extends>>
24. .
Get balance
Validate user
Withdraw money
Maintain ATM
Overdraw money
<<extends>>
<<extends>>
<<uses>>
<<Uses>>
Maintenance
person
Save transaction
Database
customer
25. CLASS DIAGRAMCLASS DIAGRAM
• A class diagram shows a set of classes,
interfaces, collaborations and their
relationships.
• Class diagram contains following things :
Classes
Interfaces
Collaboration
Dependency, Generalization and
Association relationships.
• It may contain notes and constraints.
26. .
Company
Department Office
name : Name Address : string
Person
Name : String
Eid : Integer
getPhoto(P:Photo)
getContactInfo()
getPersonalInfo()
Head Quarters
generalization
0..1
1
1..* 1..*
Personnel_Record
Contact_Info
dependency
member
role
Tax ID
Salary Isecure information
Interface
27. SEQUENCE DIAGRAMSEQUENCE DIAGRAM
• Sequence diagram shows, for a particular
scenario, the events that external actors
generate, their order, and inter-system events.
28. .
: System
: Cashier
Make a new sale
enterItem( itemID , quantity )
Description , total
[more items]
loop
end sale
total with taxes
make payment(amount)
receipt
Process Sale Scenario
29. COLLABORATION DIAGRAMCOLLABORATION DIAGRAM
• Collaboration diagrams model the interactions
between the object.
• It is the cross between an object diagram and
sequence diagram.
• Notations used :
Object
Actor
Message
30. ..
..
1. Find user
2. Update user WebApp : user
interface
User validator2.1 Validate user
User database
1.1 Lookup user
2.1 Look user
Collaboration Diagram
31. STATE CHART DIAGRAMSTATE CHART DIAGRAM
• A State Chart Diagram relates events and states.
When an event is received, the next state
depends on the current state as well as the event;
a change of state caused by an event is called as
transition.
• A State Diagram is a graph whose nodes are
states and whose directed arcs are transitions
states.
33. ACTIVITY DIAGRAMACTIVITY DIAGRAM
• Activity diagram shows the flow from activity to
activity within a system.
• Activity diagram commonly contains:
Activity State
Action State
Transitions
Objects
Forks and Join
Branching
Swimlanes
34.
35. .
Customer Sales Warehouse
Swimlanes
•
Request Product
Process Order
O : order
[in progress]
Pull Material
Ship Order
Receive
order
Bill
customer
Pay Bill
b: bill
[paid]
b: bill
[unpaid]
O : order
[filled]
state
Close order
• Final state
36. COMPONENT DIAGRAMCOMPONENT DIAGRAM
• A component is a physical replaceable part of
a system that conforms to and provides the
realization of a set of interfaces.
• COMPONENTS AND CLASSES :
1. Class are logical abstraction; while
components represent physical thing.
2. Component represent physical packaging of
logical components.
3. Classes may have attributes and operations.
Component have only operations that are
reachable only through their interfaces.