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

UML Diagrams

Uploaded by

blazecyclone2020
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)
18 views

UML Diagrams

Uploaded by

blazecyclone2020
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/ 30

Unified Modeling Language (UML) is a general-purpose modeling language.

The
main purpose of UML is to describe a standard way of visualizing the structure of a
system.

It is similar to graphics used in other industrial fields. UML is not a programming


language, but a visual language. We use UML diagrams to illustrate the behavior
and structure of the system.

UML helps software engineers, traders, and system architects in modeling, design,
and analysis. The Object Management Group (OMG) adopted the Unified Modeling
Language as a standard in 1997 and OMG has been in charge ever since.

International Standard Organization (ISO) published the UML as an approved


standard of International art in 2005. The UML has been amended over the years
and periodically revised
TYPES OF UML DIAGRAMS
Structural Diagrams:

1. Class Diagram:

Purpose:
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.

Benefits:
5.It can represent the object model for complex systems.
6.It reduces the maintenance time by providing an overview of an application’s structure before coding.
7.It provides a general schematic of an application for better understanding.
8.It represents a detailed chart by highlighting the desired code to be programmed.
9.It is helpful for the stakeholders and the developers.
Notation of Class diagram

Upper Section:
1.Capitalize the initial letter of the class name.
2.Place the class name in the center of the upper section.
3.A class name must be written in bold format.
4.The name of the abstract class should be written in italics format.

Middle Section:
1.The attributes are written along with their visibility factors, which are public
(+), private (-), protected (#), and package (~).
2.The accessibility of an attribute class is illustrated by the visibility factors.
3.A meaningful name should be assigned to the attribute, which will explain its
usage inside the class.

Lower Section: The lower section contains methods or operations.


Structural Diagrams:
Notation of Object diagram
2. Object Diagram:

Purpose:
1. It is used to perform forward and reverse engineering.
2. It is used to understand object behavior and their relationships practically.
3. It is used to get a static view of a system.
4. It is used to represent an instance of a system.

Applications:
1.To build a prototype of a system.
2.To model complex data structures.
3.To perceive the system from a practical perspective.
4.Reverse engineering.
Structural Diagrams:

3. Component Diagram: Notations of Component diagram

Purpose:
1.It envisions each component of a system.
2.It constructs the executable by incorporating forward and reverse engineering.
3.It depicts the relationships and organization of components.

Benefits:
4.It portrays the components of a system at the runtime.
5.It helps test a system.
6.It envisions the links between several connections
7.To divide a single system into multiple components according to the functionality.
8.To represent the component organization of the system.
Structural Diagrams:

4. Deployment Diagram:

Purpose:
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.

When to use?
4.To model the network and hardware topology of a system.
5.To model the distributed networks and systems.
6.Implement forwarding and reverse engineering processes.
7.To model the hardware details for a client/server system.
8.For modeling the embedded system.
Notations of Deployment diagram
A component represents a modular and An interface defines a contract
reusable part of a system, typically specifying the methods or operations
implemented as a software module, that a component must implement. It
class, or package. It encapsulates its represents a point of interaction
behavior and data and can be deployed between different components or
independently. subsystems.

An artifact represents a physical piece


of information or data that is used or A node represents a physical or
produced in the software development computational resource, such as a
process. It can include source code files, hardware device, server, workstation, or
executables, documents, libraries, computing resource, on which software
configuration files, or any other tangible components can be deployed or
item. executed.
Structural Diagrams:

5. Package Diagram:

Purpose:
1. Package Diagram can be used to simplify complex class diagrams,
it can group classes into packages.
2. A package is a collection of logically related UML elements.
3. Packages are depicted as file folders and can be used on any of the
UML diagrams.

Benefits:
1. It serves as a common language of communication between
the developers and stakeholders.
2. It provides a visual representation of system architecture.
3. It encourages a modular approach to represent any system
through smaller and easy-to-understand packages.
Structural Diagrams:

6. Composite Structure Diagram:

Purpose:
1. Composite Structure Diagrams allow the users to "Peek Inside" an object to see exactly what it is
composed of.
2. The internal actions of a class, including the relationships of nested classes, can be detailed.
3. Objects are shown to be defined as a composition of other classified objects.

Benefits:
1. Helps users understand the current state of their system.
2. Breaks down the internal structure of multiple classes,
interfaces, or components, and their interactions.
3. Details of runtime architectures and usage patterns not found in static diagrams.
4. Provides users with information to optimize and troubleshoot their system.
Behavioral Diagrams:

1. Use Case Diagram:

Purpose:
1.It gathers the system's needs.
2.It depicts the external view of the system.
3.It recognizes the internal as well as external factors that influence the system.
4.It represents the interaction between the actors.

Benefits:
1. Represent the goals of systems and users.
2. Specify the context a system should be viewed.
3. Specify system requirements.
4. Provide a model for the flow of events regarding user interactions.
5. Provide an outside view of a system.
6. Shows external and internal influences on a system.
Actors are external entities that Use cases are like scenes in the The system boundary is a visual
interact with the system. These can play. They represent specific things representation of the scope or
include users, other systems, or your system can do. In the online limits of the system you are
hardware devices. In the context of shopping system, examples of use modeling. It defines what is inside
a Use Case Diagram, actors initiate cases could be “Place Order,” the system and what is outside.
use cases and receive the “Track Delivery,” or “Update The boundary helps to establish a
outcomes. Proper identification Product Information”. Use cases clear distinction between the
and understanding of actors are are represented by ovals. elements that are part of the
crucial for accurately modeling system and those that are external
system behavior. to it.
Behavioral Diagrams:

2. Activity Diagram:

Purpose:
1. We describe what causes a particular event.
2. It portrays the control flow from a start point to a finish point showing the various decision paths that
exist while the activity is being executed.
3. Its purpose is to depict the dynamic aspects of a system.

Benefits:
1. Dynamic modeling of the system or a process.
2. Illustrate the various steps involved in a UML use case.
3. We can use Activity diagrams to depict concurrent activities easily.
4. Show the constraints, conditions, and logic behind algorithms.
5. During the requirements analysis phase, activity diagrams assist in capturing and documenting the
dynamic aspects of user interactions.
Notation of an Activity diagram

: It depicts the initial stage or beginning of the set of actions.

: It represents the set of actions that are to be performed.

: It ensures that the control or object flow will follow only one path.

: It is the stage where all the control flows and object flows end.
Behavioral Diagrams:

3. State-Machine/State-Chart Diagram:

Purpose:
1. To describe state-dependent behavior for an object.
2. Help in visualizing and understanding the dynamic behavior of a system.
3. To depict each state of an individual object.
4. It represents an interactive system and the entities inside the system.

Uses:
1. For modeling the object states of a system.
2. For modeling the reactive system as it consists of reactive objects.
3. For pinpointing the events responsible for state transitions.
4. For implementing forward and reverse engineering.
Notations of State Machine diagram

It defines the initial state (beginning) of a system, and it is


represented by a black filled circle.

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.

It is of diamond shape that represents the decisions to be made


based on an evaluated guard.

It represents the final state (end) of a system. It is denoted by a


filled circle present within a circle.
Behavioral Diagrams:

4. Interaction diagram:

Purpose:
1. To visualize the dynamic behavior of the system.
2. To envision the interaction and the message flow in the system.
3. To portray the structural aspects of the entities within the system.
4. To represent the order of the sequenced interaction in the system.
5. To visualize the real-time data and represent the architecture of an object-oriented system.

Uses:
6.The interaction diagram explores and compares the use of the collaboration diagram sequence diagram
and timing diagram.
7.The sequence diagram portrays the order of control flow from one element to the other elements inside
the system, whereas the collaboration diagrams are employed to get an overview of the object architecture
of the system.
8.The interaction diagram models the system as a time-ordered sequence of a system.
Behavioral Diagrams:

4. Interaction diagram:
--A. Sequence Diagram

Purpose:
1.To model high-level interaction among active objects within a system.
2.To model interaction among objects inside a collaboration realizing a use case.
3.It either models generic interactions or some certain instances of interaction

Benefits: Drawbacks:
4.It explores the real-time application. 1.In the case of too many lifelines, the sequence
5.It depicts the message flow between the different objects. diagram can get more complex.
6.It has easy maintenance. 2.The incorrect result may be produced if the
7.It is easy to generate. order of the flow of messages changes.
3.Since each sequence needs distinct notations
8.Implement both forward and reverse engineering.
for its representation, it may make the diagram
9.It can easily update as per the new change in the system more complex.
Notations of Sequence diagram

Activation Lifeline Actor Call


Message

Return
Message
Behavioral Diagrams:

4. Interaction diagram:
--B. Collaboration/Communication Diagram

Benefits:
1.It mainly emphasizes the structural aspect of an interaction diagram, i.e., how lifelines are connected.
2.The messages transmitted over sequencing are represented by numbering each message.
3.It focuses on the elements and not the message flow, like sequence diagrams.
4.Since the collaboration diagrams are not that expensive, the sequence diagram can be directly converted
to the collaboration diagram.

Drawbacks:
5.Multiple objects residing in the system can make a complex collaboration diagram, as it becomes quite
hard to explore the objects.
6.It is a time-consuming diagram.
7.After the program terminates, the object is destroyed.
8.As the object state changes momentarily, it becomes difficult to keep an eye on every single that has
occurred inside the object of a system.
Notations of Collaboration diagram
Objects: The representation of an object is done by an object
symbol with its name and class underlined, separated by a
colon.

Actors: In the collaboration diagram, the actor plays the main


role as it invokes the interaction. Each actor has a respective
role and name. In this, one actor initiates the use case.

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.

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.

You might also like