UML
Presented By:- Simranjeet Singh Dhatt
Contents
UML basic
1. Use case diagram
2. Class diagram
3. Activity diagram
4. Sequence diagram
5. StateMachine diagram
2
UML Diagram – What is UML?
The Unified Modeling Language (UML) is a standard language for
Specifying Visualizing Constructing Documenting
Business Modeling Communications
3
Different Views
Users Designers Analyzers
4
Use case diagram System
boundary
Actor • overview the usage requirements
• presentations project stakeholders
• "the meat" of the actual requirements
System
Use case:
Actor: boundary:
indicates
A
Anuse case
actor the
is adescribes
scope oforganization,
person, ayour
sequence of or
actions
system.
externalthat
Anything
provide
system within
that something
playsthe
a box
roleofin
Use case
measurable
represents
one or morefunctionality
value to an that
interactions actor
withisyour
and
in is
drawn
scope
systemand
as aanything
horizontaloutside
ellipsethe box
is not
Online C2C shopping
5
Class Diagram
Name Class diagrams show the classes of the
system, their interrelationships (including
inheritance, aggregation, and
association), and the operations and
attributes of the classes.
• Associations
• Aggregation
Relations • Generalization
Attributes
Operations
6
Relationships between Class Diagrams
Association -- a relationship between instances of the two
classes. There is an association between two classes if an
instance of one class must know about the other in order to
perform its work. In a diagram, an association is a link
connecting two classes.
Aggregation -- an association in which one class belongs to a
collection. An aggregation has a diamond end pointing to the
part containing the whole.
Generalization -- an inheritance link indicating one class is a
superclass of the other. A generalization has a triangle pointing
to the superclass.
7
Sequence Diagram
Object: Class
A sequence diagram is
An interaction diagram that
details how operations are
carried out.
What messages are sent
and when.
Sequence diagrams are
organized according to time
Message
Operations
Lifeline
8
Activities Diagram
Start
Activity diagrams describe the
Fork workflow behaviour of a system
Branch
Merge
Joint
9
End
State Machine Diagram
A State Machine diagram
shows the possible states of
the object and the transitions
that cause a change in state.
What is different
?
between activities
and Statemachine
diagram
10
Practices Section
Practice example:
Online course register System
• New students can register the course, modules and tutor by themselves.
• Old students can register the new modules.
• There are two kinds of students, undergraduates and postgraduates.
• Postgraduates students needs to check the entrance requirements.
11
Now we can start to use
In the first, we do the Use case diagram, class diagram and sequences
diagrams.
In the second, we do the activities diagram and state machine diagram
12
13