You are on page 1of 18

UML Diagraming

CLASS Diagram:
Class diagram is a static diagram. It represents the static view of an application.
Class diagram is not only used for visualizing, describing, and documenting
different aspects of a system but also for constructing executable code of the
software application.

Class diagram describes the attributes and operations of a class and also the
constraints imposed on the system

Indicator Meaning

0..1 Zero or one

1 One only

0..* Zero or more

* Zero or more

1..* One or more

3 Three only

0..5 Zero to Five

5..15 Five to Fifteen

6
7
Use case model:
A use case diagram is a dynamic or behavior diagram in UML. Use case diagrams model the
functionality of a system using actors and use cases. Use cases are a set of actions, services, and
functions that the system needs to perform. In this context, a "system" is something being developed
or operated, such as a web site. The "actors" are people or entities operating under defined roles
within the system.

Basic Use Case Diagram Symbols and


Notations
System
Draw your system's boundaries using a rectangle that contains use cases. Place actors outside the
system's boundaries.

Use Case
Draw use cases using ovals. Label the ovals with verbs that represent the system's functions.

Actors
Actors are the users of a system. When one system is the actor of another system, label the actor
system with the actor stereotype.

Relationships
Illustrate relationships between an actor and a use case with a simple line.

8
Use Cases Description
Request Face Detection The user requests the system to find a human face in video.
Request Face Recognition The user requests the system to match a detected face.
Perform Camera Control Allows the user to rotate the camera up, down, left and right
Request Infrared video The user request to view stream from Infrared camera
Request Green Filter The user request to apply green filter on Infrared stream
Request Trace Contours The user request to apply trace filter on Infrared stream

Sequence and activity diagram:


An activity diagram visually presents a series of actions or flow of control in a system similar to
a flowchart or a data flow diagram.

Basic Activity Diagram Notations and


Symbols
9
Initial State or Start Point
A small filled circle followed by an arrow represents the initial action state or the start point for
any activity diagram.

Activity or Action State


An action state represents the non-interruptible action of objects. You can draw an action state in
SmartDraw using a rectangle with rounded corners.

Action Flow
Action flows, also called edges and paths, illustrate the transitions from one action state to
another. They are usually drawn with an arrowed line.

Object Flow
Object flow refers to the creation and modification of objects by activities. An object flow arrow
from an action to an object means that the action creates or influences the object.

Decisions and Branching


A diamond represents a decision with alternate paths. When an activity requires a decision prior
to moving on to the next activity.

1
0
Guards
In UML, guards are a statement written next to a decision diamond that must be true before
moving next to the next activity.

Time Event
This refers to an event that stops the flow for a time; an hourglass depicts it.

Merge Event
A merge event brings together multiple flows that are not concurrent.

Sent and Received Signals


Signals represent how activities can be modified from outside the system.

Interrupting Edge
An event, such as a cancellation,

1
1
Sequence diagram :
Basic Sequence Diagram Notations
Class Roles or Participants
Class roles describe the way an object will behave in context. Use the UML object symbol to illustrate
class roles, but don't list object attributes.

Activation or Execution Occurrence


Activation boxes represent the time an object needs to complete a task. When an object is busy
executing a process or waiting for a reply message, use a thin gray rectangle placed vertically on its
lifeline.

Messages
Messages are arrows that represent communication between objects. Use half-arrowed lines to
represent asynchronous messages. Asynchronous messages are sent from an object that will not wait
for a response from the receiver before continuing its tasks. For message types, see below.

1
2
Lifelines
Lifelines are vertical dashed lines that indicate the object's presence over time.

Destroying Objects
Objects can be terminated early using an arrow labeled "<< destroy >>" that points to an X. This
object is removed from memory. When that object's lifeline ends, you can place an X at the end of
its lifeline to denote a destruction occurrence.

1
3
Loops
A repetition or loop within a sequence diagram is depicted as a rectangle. Place the condition for
exiting the loop at the bottom left corner in square brackets [ ].

Activity and sequence:


Face detection:

1
4
Detect faces in
image
Wait for stream

No face
No detected
Image

Highlight
Haar Cascade detected faces
algorithm

Face recognition:
Highlight
Image
detected faces

Haar Cascade
algorithm

Detect faces in Search for

image match in folder

No
face

detected

Rotate camera:
Filter affect:
Connect
Camera

no Wait for yes

stream

Copy frame to
Display error
memory

Remove red
and blue colors

Return Image
Component model:
Component diagram is a special kind of diagram in UML. The purpose is
also different from all other diagrams discussed so far. It does not describe
the functionality of the system but it describes the components used to
make those functionalities.

Basic Component Diagram Symbols and Notations


Component
A component is a logical unit block of the system, a slightly higher abstraction than classes. It is
represented as a rectangle with a smaller rectangle in the upper right corner with tabs or the
word written above the name of the component to help distinguish it from a class.

Interface
An interface (small circle or semi-circle on a stick) describes a group of operations used
(required) or created (provided) by components. A full circle represents an interface created or
provided by the component. A semi-circle represents a required interface, like a person's input.

Dependencies
Draw dependencies among components using dashed arrows.
Port
Ports are represented using a square along the edge of the system or a component. A port is
often used to help expose required and provided interfaces of a component.
Deployment diagraming:
The term Deployment itself describes the purpose of the diagram. Deployment
diagrams are used for describing the hardware components, where software
components are deployed. Component diagrams and deployment diagrams are
closely related.

Package is used to group elements, and to provide a namespace for the

grouped elements.

Objects are model elements that represent instances of a class or of classes.

Component represents a modular part of a system. A component defines its

behavior in terms of provided and required interfaces.


Interfaces are model elements that define sets of operations that other model

elements, such as classes, or components must implement.

Data flow is one kind of data driven architecture which explains how data is

processed and transferred in a system.

Note contains comments or textual information.

You might also like