0% found this document useful (0 votes)
15 views61 pages

Wa0028.

This document provides an overview of the Unified Modeling Language (UML), detailing its various diagrams used for modeling software systems, including Use Case, Class, Interaction, Statechart, Activity, Package, Component, and Deployment diagrams. It explains the purpose and characteristics of each diagram, emphasizing their roles in visualizing, constructing, and documenting software artifacts. Additionally, it outlines the building blocks of UML, such as things, relationships, and diagrams, and discusses the importance of capturing both static and dynamic behaviors in system modeling.

Uploaded by

allesukshith1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views61 pages

Wa0028.

This document provides an overview of the Unified Modeling Language (UML), detailing its various diagrams used for modeling software systems, including Use Case, Class, Interaction, Statechart, Activity, Package, Component, and Deployment diagrams. It explains the purpose and characteristics of each diagram, emphasizing their roles in visualizing, constructing, and documenting software artifacts. Additionally, it outlines the building blocks of UML, such as things, relationships, and diagrams, and discusses the importance of capturing both static and dynamic behaviors in system modeling.

Uploaded by

allesukshith1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 61

UNIT – III

• UNIT – III: Modeling with UML: Modeling Concepts and Diagrams -


Use Case Diagrams - Class Diagrams - Interaction Diagrams - State
chart Diagrams – Activity Diagrams - Package Diagrams - Component
Diagrams – Deployment Diagrams -Diagram OrganizationDiagram
Extensions.
Unified Modeling Language
• UML, short for Unified Modeling Language, is a standardized
modeling language consisting of an integrated set of diagrams,
developed to help system and software developers for specifying,
visualizing, constructing, and documenting the artifacts of software
systems, as well as for business modeling and other non-software
systems.
• It was initially developed by Grady Booch, Ivar Jacobson, and James
Rumbaugh in 1994-95 at Rational software, and its further development
was carried out through 1996. In 1997, it got adopted as a standard
• Characteristics of UML
• The UML has the following features:
• It is a generalized modeling language.
• It is distinct from other programming languages like C++, Python, etc.
• It is interrelated to object-oriented analysis and design.
• It is used to visualize the workflow of the system.
• It is a pictorial language, used to generate powerful modeling artifacts.
• by the Object Management Group.
• As UML describes the real-time systems, it is very important to make
a conceptual model and then proceed gradually. The conceptual
model of UML can be mastered by learning the following three major
elements −

• UML building blocks


• Rules to connect the building blocks
• Common mechanisms of UML
• This chapter describes all the UML building blocks. The building blocks of UML can be defined as −

• Things
• Relationships
• Diagrams
• Things
• Things are the most important building blocks of UML. Things can be −

• Structural
• Behavioral
• Grouping
• Annotational
UML - Use Case Diagrams

• To model a system, the most important aspect is to


capture the dynamic behavior. Dynamic behavior means
the behavior of the system when it is running/operating.
• Only static behavior is not sufficient to model a system
rather dynamic behavior is more important than static
behavior.
• In UML, there are five diagrams available to model the
dynamic nature and use case diagram is one of them.
Now as we have to discuss that the use case diagram is
dynamic in nature, there should be some internal or
external factors for making the interaction.
• These internal and external agents are known as actors.
Use case diagrams consists of actors, use cases and
their relationships. The diagram is used to model the
system/subsystem of an application.
• A single use case diagram captures a particular
functionality of a system.
• In brief, the purposes of use case diagrams can be said
to be as follows −
• Used to gather the requirements of a system.
• Used to get an outside view of a system.
• Identify the external and internal factors influencing the
system.
• Show the interaction among the requirements are
actors.
• we should have the following items identified.
• Functionalities to be represented as use case
• Actors- Actors can be a human user, some internal
applications, or may be some external applications
• Relationships among the use cases and actors.
Use Case Diagrams
• Use case diagrams can be used for −
• Requirement analysis and high level design.
• Model the context of a system.
• Reverse engineering.
• Forward engineering.
Class Diagram

• What is a Class Diagram?


• The class diagram depicts a static view of an
application. It represents the types of objects residing in
the system and the relationships between them.
• A class consists of its objects, and also it may inherit
from other classes.
• A class diagram is used to visualize, describe, document
various different aspects of the system, and also
construct executable software code.
• It constitutes class names, attributes, and functions in
a separate compartment that helps in software
development.
• Since it is a collection of classes, interfaces,
associations, collaborations, and constraints, it is
termed as a structural diagram.
• Purpose of Class Diagrams
• The main purpose of class diagrams is to build a static view
of an application. It is the only diagram that is widely used
for construction, and it can be mapped with object-oriented
languages. It is one of the most popular UML diagrams.
Following are the purpose of class diagrams given below:
1.It analyses and designs a static view of an application.
2.It describes the major responsibilities of a system.
3.It is a base for component and deployment diagrams.
4.It incorporates forward and reverse engineering.
Class Diagram
Uses of class diagram
1.To describe the static view of a system.
2.To show the collaboration among every instance in the
static view.
3.To describe the functionalities performed by the
system.
4.To construct the software application using object-
oriented languages.
UML - Interaction Diagrams

• From the term Interaction, it is clear that the diagram is


used to describe some type of interactions among the
different elements in the model. This interaction is a
part of dynamic behavior of the system.
• This interactive behavior is represented in UML by two
diagrams known as Sequence
diagram and Collaboration diagram. The basic
purpose of both the diagrams are similar.
• Sequence diagram emphasizes on time sequence of messages
and collaboration diagram emphasizes on the structural
organization of the objects that send and receive messages.

The sequence diagram envisions the order of the flow of
messages inside the system by depicting the communication
between two lifelines, just like a time-ordered sequence of
events.
• The collaboration diagram, which is also known as the
communication diagram, represents how lifelines connect within
the system, whereas the timing diagram focuses on that instant
when a message is passed from one element to the other.
Notation of an Interaction Diagram
Purpose of an Interaction Diagram

• The purpose of interaction diagram is −


• To capture the dynamic behaviour of a system.
• To describe the message flow in the system.
• To describe the structural organization of the objects.
• To describe the interaction among objects.
The Sequence Diagram
collaboration diagram
• The collaboration diagram is used to show the relationship between
the objects in a system. Both the sequence and the collaboration
diagrams represent the same information but differently. Instead of
showing the flow of messages, it depicts the architecture of the
object residing in the system as it is based on object-oriented
programming. An object consists of several features.

• The collaboration diagram, which is also known as a


communication diagram, is used to portray the object's
architecture in the system.
1.Objects: The representation of an object is done by an
object symbol with its name and class underlined,
separated by a colon.
In the collaboration diagram, objects are utilized in the
following ways:
1.The object is represented by specifying their name and class.
2.It is not mandatory for every class to appear.
3.A class may constitute more than one object.
4.In the collaboration diagram, firstly, the object is created, and
then its class is specified.
5.To differentiate one object from another object, it is necessary
to name them.
1.Actors: In the collaboration diagram, the actor plays the main role as it
invokes the interaction. Each actor has its respective role and name. In this,
one actor initiates the use case.
2.Links: The link is an instance of association, which associates the objects and
actors. It portrays a relationship between the objects through which the
messages are sent. It is represented by a solid line. The link helps an object to
connect with or navigate to another object, such that the message flows are
attached to links.
3.Messages: It is a communication between objects which carries information
and includes a sequence number, so that the activity may take place. It is
represented by a labeled arrow, which is placed near a link. The messages are
sent from the sender to the receiver, and the direction must be navigable in
that particular direction. The receiver must understand the message.
Sequence Diagrams Collaboration Diagrams DIFFERENCES

Sequence Diagrams Collaboration Diagrams

The sequence diagram represents the UML, which is used to visualize the The collaboration diagram also comes under the UML representation which is
sequence of calls in a system that is used to perform a specific functionality. used to visualize the organization of the objects and their interaction.

The sequence diagram are used to represent the sequence of messages that The collaboration diagram are used to represent the structural organization of
are flowing from one object to another. the system and the messages that are sent and received.

The sequence diagram is used when time sequence is main focus. The collaboration diagram is used when object organization is main focus.

The sequence diagrams are better suited of analysis activities. The collaboration diagrams are better suited for depicting simpler interactions
of the smaller number of objects.
Statechart Diagrams
• Statechart diagram is one of the five UML diagrams
used to model the dynamic nature of a system.
• They define different states of an object during its
lifetime and these states are changed by events.
• Statechart diagrams are useful to model the reactive
systems.
• Statechart 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 most important purpose of Statechart diagram is to
model lifetime of an object from creation to termination.
• Notation of a State Machine Diagram
• Following are the notations of a state machine diagram
enlisted below:
• Initial state: It defines the initial state (beginning) of a system, and it is
represented by a black filled circle.
• Final state: It represents the final state (end) of a system. It is denoted by a filled
circle present within a circle.
• Decision box: It is of diamond shape that represents the decisions to be made on
the basis of an evaluated guard.
• Transition: A change of control from one state to another due to the occurrence
of some event is termed as a transition. It is represented by an arrow labeled with
an event due to which the change has ensued.
• State box: It depicts the conditions or circumstances of a particular object of a
class at a specific point of time. A rectangle with round corners is used to
represent the state box.
Statechart diagrams
• Following are the main purposes of using Statechart
diagrams −
• To model the dynamic aspect of a system.
• To model the life time of a reactive system.
• To describe different states of an object during its life
time.
• Define a state machine to model the states of an object.
• Before drawing a Statechart diagram we should clarify
the following points −
• Identify the important objects to be analyzed.
• Identify the states.
• Identify the events.
UML Activity Diagram

• In UML, the activity diagram is used to demonstrate the


flow of control within the system rather than the
implementation. It models the concurrent and
sequential activities.
• The activity diagram helps in envisioning the workflow
from one activity to another. It put emphasis on the
condition of flow and the order in which it occurs. The
flow can be sequential, branched, or concurrent, and to
deal with such kinds of flows, the activity diagram has
come up with a fork, join, etc.
UML Activity Diagram

• Activity partition /swimlane


• Activity partition /swimlane
• The swimlane is used to cluster all the related activities
in one column or one row. It can be either vertical or
horizontal. It used to add modularity to the activity
diagram. It is not necessary to incorporate swimlane in
the activity diagram.
• Forks
• Forks and join nodes generate the concurrent flow
inside the activity. A fork node consists of one inward
edge and several outward edges. It is the same as that
of various decision parameters.
Notation of an Activity diagram

• Activity diagram constitutes following notations:


• Initial State: It depicts the initial stage or beginning of the
set of actions.
• Final State: It is the stage where all the control flows and
object flows end.
• Decision Box: It makes sure that the control flow or object
flow will follow only one path.
• Action Box: It represents the set of actions that are to be
performed.
• Following are the rules that are to be followed for drawing an
activity diagram:
1.A meaningful name should be given to each and every activity.
2.Identify all of the constraints.
3.Acknowledge the activity associations.
• Following are the rules that are to be followed for drawing an
activity diagram:
1.A meaningful name should be given to each and every activity.
2.Identify all of the constraints.
3.Acknowledge the activity associations.
Package diagrams
• Package diagrams are structural diagrams used to show
the organization and arrangement of various model
elements in the form of packages.
• A package is a grouping of related UML elements, such
as diagrams, documents, classes, or even other
packages. Each element is nested within the package,
which is depicted as a file folder within the diagram,
then arranged hierarchically within the diagram.
• Package diagrams are most commonly used to provide
a visual organization of the layered architecture within
any UML classifier, such as a software system.
Symbol Image Symbol Name Description

Package Groups common elements based on data,


behavior, or user interaction

Depicts the relationship between one


Dependency element (package, named element, etc) and
another
• There are two main types of dependencies:
• Access: Indicates that one package requires assistance
from the functions of another package.
Example:
• Import: Indicates that functionality has been imported
from one package to another.
Example:
UML Component Diagram

• A component diagram is used to break down a large


object-oriented system into the smaller components, so
as to make them more manageable. It models the
physical view of a system such as executables, files,
libraries, etc. that resides within the node.

• A component is a single unit of the system, which is


replaceable and executable.
Notation of a Component Diagram

a) A component
NODE
• Example of a Component Diagram
• A component diagram for an online shopping system is
given below:
• The component diagram can be used for the followings:
1.To model the components of the system.
2.To model the schemas of a database.
3.To model the applications of an application.
4.To model the system's source code.
UML Deployment Diagram

• The deployment diagram visualizes the physical


hardware on which the software will be deployed. It
portrays the static deployment view of a system. It
involves the nodes and their relationships.
• It ascertains how software is deployed on the hardware.
It maps the software architecture created in design to
the physical system architecture, where the software
will be executed as a node. Since it involves many
nodes, the relationship is shown by utilizing
communication paths.
purposes of deployment diagram
• Following are the purposes of deployment diagram
enlisted below:
1.To envision the hardware topology of the system.
2.To represent the hardware components on which the
software components are installed.
3.To describe the processing of nodes at the runtime.
Symbol and notation of Deployment
diagram
• The deployment diagram consist of the following
notations:
1.A component
2.An artifact
3.An interface
4.A node
Example of a Deployment diagram

Following deployment diagram represents the working of HTML5 video player in the browser:
Deployment diagrams
• Deployment diagrams can be used for,
1.Modeling the network topology of a system.
2.Modeling distributed systems and networks.
3.Forward and reverse engineering processes.
Organization Diagrams

• Organization Diagrams
• Organization diagrams are an extension of systems
diagrams that are modified so that they can be used to
describe the basic structure of an organization, the
relationship of the organization to its external
environment, and the relationships among the
departmental units within the organization.
Organization Diagrams

You might also like