0% found this document useful (0 votes)
329 views

UML Diagrams

UML diagrams are used to model different aspects of a software system. The main types of UML diagrams are: - Structure diagrams (class, component) emphasize the structural elements like classes, components and their relationships. - Behavior diagrams (sequence, activity, state) emphasize the dynamic behavior showing interactions and flows between elements. - Use case diagrams describe functionality of the system from the user's perspective in terms of actors, use cases and their relationships.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
329 views

UML Diagrams

UML diagrams are used to model different aspects of a software system. The main types of UML diagrams are: - Structure diagrams (class, component) emphasize the structural elements like classes, components and their relationships. - Behavior diagrams (sequence, activity, state) emphasize the dynamic behavior showing interactions and flows between elements. - Use case diagrams describe functionality of the system from the user's perspective in terms of actors, use cases and their relationships.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 56

UML Diagrams

What is UML ?
• UML stands for “Unified Modeling Language”
• It is a industry-standard graphical language
for specifying, visualizing, constructing, and
documenting the artifacts of software
systems
• The UML uses mostly graphical notations to
express the OO analysis and design of
software projects.
• Simplifies the complex process of software
design.
• Behavior diagrams : Behavior diagrams
emphasize what must happen in the system
being modeled. Since behavior diagrams
illustrate the behavior of a system, they are
used extensively to describe the functionality
of software systems.
• Structure diagrams :Structure diagrams
emphasize the things that must be present in
the system being modeled. Since structure
diagrams represent the structure, they are
used extensively in documenting the software
architecture of software systems
Types of UML Diagram
• Use Case Diagram
• Class Diagram
• Sequence Diagram
• Collaboration Diagram
• State Diagram
• Activity Diagram
• Component Diagram
• Deployment Diagram
USE CASE DIAGRAM
• Use case diagrams are consists of actors, use cases
and their relationships. The diagram is used to
model the system of an application.
• A single use case diagram captures a particular
functionality of a system.
The purposes of use case diagrams can be as follows:
• Used to gather requirements of a system.
• Used to get an outside view of a system.
• Show the interaction among the requirements and
actors.
When we are planning to draw an use case
diagram we should have the following items
identified.
• Functionalities to be represented as an usecase
• Actors
• Relationships among the use cases and actors.
The following are the places where use case
diagrams are used:
• Requirement analysis and high level design.
• Model the context of a system.
follow the following guidelines to draw an efficient
use case diagram.
• The name of a use case is very important. So the
name should be chosen in such a way so that it
can identify the functionalities performed.
• Give a suitable name for actors.
• Show relationships and dependencies clearly in
the diagram.
• Do not try to include all types of relationships.
Because the main purpose of the diagram is to
identify requirements.
Use Case Diagram
Describes the functionality provided by a system in
terms of actors, their goals represented as use
cases, and any dependencies among those use
cases.
• Used for describing a set of user scenarios
• Mainly used for capturing user requirements
• Work like a contract between end user and
software developers
• Association: communication between an actor and a use case;
Represented by a solid line.
• Generalization: relationship between one general use case
and a special use case. Represented by a line with a triangular
arrow head toward the parent use case.
• Include: a dotted line labeled <<include>> beginning at base
use case and ending with an arrows pointing to the include use
case.
• Extend: a dotted line labeled <<extend>> with an arrow
toward the base case. The extending use case may add
behavior to the base use case.

Association: Generalization: <<include>> <<extend>>


An Example of Use Case Diagram
Example:
Use case Diagram for Passport Automation System
CLASS DIAGRAM
• The class diagram is a static diagram. It
represents the static view of an application.
• A Class diagram models the static structure of a
system.
• It shows relationships between classes,
attributes, and operations.
• A class has three parts; name at the top,
attributes in the middle and operations/methods
at the bottom.
• The functionality provided by the class are
termed “methods” of the class.
• Attribute uniquely identify the class.
• Purpose of the class diagram:
• Analysis and design of the static view of an
application.
• Describe responsibilities of a system.
• Base for component and deployment
diagrams.
Class Representation
• Each class is represented by a rectangle
subdivided into three compartments
• Name
• Attributes
• Operations
• Modifiers are used to indicate visibility of
attributes and operations.
• ‘+’ is used to denote Public visibility (everyone)
• ‘#’ is used to denote Protected visibility (friends
and derived)
• ‘-’ is used to denote Private visibility (no one)
• By default, attributes are hidden and operations
are visible.
An example of Class
HOW TO DRAW CLASS DIAGRAM?
• The following points should be remembered
while drawing a class diagram:
• The name of the class diagram should be
meaningful to describe the aspect of the system.
• Each element and their relationships should be
identified in advance.
• Responsibility (attributes and methods) of each
class should be clearly identified.
• For each class minimum number of properties
should be specified. Because unnecessary
properties will make the diagram complicated.
CLASS DIAGRAM FOR LIBRARY MANAGEMENT SYSTEM
Class Diagram for Passport Automation System
Interaction diagrams
• Interaction diagrams, a subset of behavior
diagrams, emphasize the flow of control and
data among the things in the system being
modeled.
• The purposes of interaction diagrams are to
- visualize the interactive behavior of the
system.
• Different types of models
a. Sequence Diagram.
b. Collaboration Diagram
Interaction Diagram : Sequence Diagram
• A Sequence diagram is an interaction diagram
that shows how objects communicate with
each other in terms of a sequence of
messages and in what order.
• Also indicates the life spans of objects relative
to those messages.
• Sequence diagram is used to describe some
type of interactions among the different
elements/objects in the system.
• Important aspect of this is that it is time-
ordered.
Purposes of sequence diagram
• To capture dynamic behavior of a system.
• To describe the message flow in the system.
• To describe organization of the objects.
• To describe interaction among objects.

The following things are to identified clearly before


drawing the interaction diagram:
• Objects taking part in the interaction.
• Message flows among the objects.
• The sequence in which the messages are flowing.
• Object organization
SEQUENCE DIAGRAM FOR ISSUE BOOK
Sequence diagram for login and verification
Interaction Diagrams: Collaboration diagrams
1. Shows the relationship between objects and
the order of messages passed between them.
2. The objects are listed as rectangles and
arrows indicate the messages being passed.
3. The numbers next to the messages are called
sequence numbers.
4. convey the same information as sequence
diagrams, but focus on object roles instead of
the time sequence.
Collaboration diagrams
COLLABORATION DIAGRAM FOR LOGIN AND VERIFICATION
STATE DIAGRAM
• As the name suggests, it describes different states
of a Object in a system.
• State Diagrams show the sequences of states an
object goes through during its life cycle.
• State diagram describes the flow of control from
one state to another state. States are defined as a
condition in which an object exists and it changes
when some event is triggered.
• The states are specific to a component/object of
a system.
• Objects in the system change status in response
to events. Used to model dynamic nature of a
system.
Following are the main purposes of using State
diagrams:
• To model dynamic aspect of a system.
• To model life time of a reactive system.
• To describe different states of an object during its
life time.
• Define a state machine to model states of an
object.
Before drawing a State diagram we must have
clarified the following points:
• Identify important objects to be analyzed.
• Identify the states & Identify the events.
STATE DIAGRAM FOR PHONE
STATE CHART DIAGRAM FOR PASSPORT AUTOMATION SYSTEM
ACTIVITY DIAGRAM
• Activity diagram is another important diagram in
UML to describe dynamic aspects of the system.
• Describes the business and operational step-by-
step workflows of components in a system.
• An activity diagram shows the overall flow of
control.
• Activity diagram is basically a flow chart to
represent the flow from one activity to another
activity. The activity can be described as an
operation of the system.
• So the control flow is drawn from one operation to
another. This flow can be sequential, branched or
concurrent. Activity diagrams deals with all type of
flow control by using different elements like fork,
join etc.
Purpose of activity diagram can be described as:
• Draw the activity flow of a system.
• Describe the sequence from one activity to
another.
• Describe the parallel, branched and concurrent
flow of the system.
Before drawing an activity diagram we should
identify the following elements:
• Activities
• Association
• Conditions
• Constraints
ACTIVITY DIAGRAM FOR ATM
ACTIVITY DIAGRAM FOR (ISSUE BOOK) ONLINE LIBRARY
MANAGEMENT SYSTEM
ACTIVITY DIAGRAM
FOR PASSPORT
AUTOMATION
SYSTEM
COMPONENT DIAGRAM
• Component diagrams are different in terms of
nature and behavior.
• Describes how a software system is split up
into components and shows the dependencies
among these components.
• A component represent a modular part of a
system.
• Component diagrams are used to model
software components of a system like
executables, libraries, files, documents etc.
• So component diagrams are used to visualize
the organization of components and
relationships among components in a system.
• A component define its behaviors in terms of
required interfaces.
• Here the three components are applicant,
system admin and authority.
• The interface between people and system
admin, from people to authority.
Purpose of the component diagram can be summarized
as:
1.)Visualize the components of a system.
2.)Construct executables by using forward and reverse
engineering.
3.)Describe the organization and relationships of the
components.
• A single component diagram cannot represent the
entire system but a collection of diagrams are used to
represent the whole.
Before drawing a component diagram the following
artifacts are to be identified clearly:
• 1.) Files used in the system.
• 2.)Libraries and other artifacts relevant to the
application.
• 3.)Relationships among the artifacts.
COMPONENT DIAGRAM FOR ATM
COMPONENT DIAGRAM FOR PASSPORT
AUTOMATION SYSTEM
DEPLOYMENT DIAGRAM
• Deployment diagrams are used to visualize the
topology of the physical components of a
system where the software components are
deployed.
• So deployment diagrams are used to describe
the static deployment view of a system.
Deployment diagrams consist of nodes and
their relationships.
• Describes the hardware used in system
implementations and the execution
environments and artifacts deployed on the
hardware .
The purpose of deployment diagrams can be described
as:
• Visualize hardware topology of a system.
• Describe the hardware components used to deploy
software components.
• Describe runtime processing nodes.

Deployment diagrams are useful for system engineers. An


efficient deployment diagram is very important
because it controls the following parameters:
• >Performance>Scalability>Maintainability>Portability

So before drawing a deployment diagram the following


artifacts should be identified:
• >Nodes>Relationships among nodes
DEPLOYMENT DIAGRAM FOR LIBRARY
MANAGEMENT SYSTEM

You might also like