0% found this document useful (0 votes)
14 views8 pages

Uml

Uploaded by

Prasmita Roy
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
0% found this document useful (0 votes)
14 views8 pages

Uml

Uploaded by

Prasmita Roy
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 8

UML stands for Unified Modelling Language.

It’s a rich language to model software solutions,


application structures, system behaviour and business processes. There are 14 UML diagram
types to help you model these behaviours.
You can draw UML diagrams online using our software, or check out some UML diagram examples
at our diagramming community.
List of UML Diagram Types
So what are the different UML diagram types? There are two main categories; structure
diagrams and behavioural diagrams. Click on the links to learn more about a specific diagram
type.
•Structure Diagrams
• Class Diagram
• Component Diagram
• Deployment Diagram
• Object Diagram
• Package Diagram
• Profile Diagram
• Composite Structure Diagram
•Behavioural Diagrams
• Use Case Diagram
• Activity Diagram
• State Machine Diagram
• Sequence Diagram
• Communication Diagram
• Interaction Overview Diagram
UML 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 shows the attributes, classes, functions, and relationships to give an overview of the software system. 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.
Benefits of Class Diagrams
It can represent the object model for complex systems.
It reduces the maintenance time by providing an overview of how an application is structured before coding.
It provides a general schematic of an application for better understanding.
It represents a detailed chart by highlighting the desired code, which is to be programmed.
It is helpful for the stakeholders and the developers.
Vital components of a Class Diagram
The class diagram is made up of three sections:

Upper Section: The upper section encompasses the name of the class. A class is a representation of similar objects that
shares the same relationships, attributes, operations, and semantics. Some of the following rules that should be taken
into account while representing a class are given below:
Capitalize the initial letter of the class name.
Place the class name in the center of the upper section.
A class name must be written in bold format.
The name of the abstract class should be written in italics format.
Middle Section: The middle section constitutes the attributes, which describe the quality of the class. The attributes have
the following characteristics:
The attributes are written along with its visibility factors, which are public (+), private (-), protected (#), and package (~).
The accessibility of an attribute class is illustrated by the visibility factors.
A meaningful name should be assigned to the attribute, which will explain its usage inside the class.
Lower Section: The lower section contain methods or operations. The methods are represented in the form of a list,
where each method is written in a single line. It demonstrates how a class interacts with data.
How to draw a Class Diagram?

The class diagram is used most widely to construct software applications. It not only represents a static view of the system but also
all the major aspects of an application. A collection of class diagrams as a whole represents a system.

Some key points that are needed to keep in mind while drawing a class diagram are given below:

To describe a complete aspect of the system, it is suggested to give a meaningful name to the class diagram.
The objects and their relationships should be acknowledged in advance.
The attributes and methods (responsibilities) of each class must be known.
A minimum number of desired properties should be specified as more number of the unwanted property will lead to a complex
diagram.
Notes can be used as and when required by the developer to describe the aspects of a diagram.
The diagrams should be redrawn and reworked as many times to make it correct before producing its final version.

Usage of Class diagrams


The class diagram is used to represent a static view of the system. It plays an essential role in the establishment of the component
and deployment diagrams. It helps to construct an executable code to perform forward and backward engineering for any system, or
we can say it is mainly used for construction. It represents the mapping with object-oriented languages that are C++, Java, etc. Class
diagrams can be used for the following purposes:

To describe the static view of a system.


To show the collaboration among every instance in the static view.
To describe the functionalities performed by the system.
To construct the software application using object-oriented languages.
Vital components of a Class Diagram
The class diagram is made up of three sections:

Upper Section:

The upper section encompasses the name of the class. A class is a representation of similar objects that shares the
same relationships, attributes, operations, and semantics. Some of the following rules that should be taken into account
while representing a class are given below:

Capitalize the initial letter of the class name.


Place the class name in the center of the upper section.
A class name must be written in bold format.
The name of the abstract class should be written in italics format.
Middle Section: The middle section constitutes the attributes, which describe the quality of the class. The attributes
have the following characteristics:

The attributes are written along with its visibility factors, which are public (+), private (-), protected (#), and package (~).
The accessibility of an attribute class is illustrated by the visibility factors.
A meaningful name should be assigned to the attribute, which will explain its usage inside the class.
Lower Section: The lower section contain methods or operations. The methods are represented in the form of a list,
where each method is written in a single line. It demonstrates how a class interacts with data.
How to draw a Class Diagram?
The class diagram is used most widely to construct software applications. It not only
represents a static view of the system but also all the major aspects of an
application. A collection of class diagrams as a whole represents a system.

Some key points that are needed to keep in mind while drawing a class diagram are
given below:

To describe a complete aspect of the system, it is suggested to give a meaningful


name to the class diagram.
The objects and their relationships should be acknowledged in advance.
The attributes and methods (responsibilities) of each class must be known.
A minimum number of desired properties should be specified as more number of
the unwanted property will lead to a complex diagram.
Notes can be used as and when required by the developer to describe the aspects
of a diagram.
The diagrams should be redrawn and reworked as many times to make it correct
before producing its final version.
Structure diagrams in general

As I have said, structure diagrams show the static structure of the system
being modeled. focusing on the elements of a system, irrespective of time.
Static structure is conveyed by showing the types and their instances in the
system. Besides showing system types and their instances, structure diagrams
also show at least some of the relationships among and between these
elements and potentially even show their internal structure.

Structure diagrams are useful throughout the software lifecycle for a variety
of team members. In general, these diagrams allow for design validation and
design communication between individuals and teams. For example, business
analysts can use class or object diagrams to model a business's current assets
and resources, such as account ledgers, products, or geographic hierarchy.
Architects can use the component and deployment diagrams to test/verify
that their design is sound. Developers can use class diagrams to design and
document the system's coded (or soon-to-be-coded) classes.
Abstract classes and operations
The observant reader will notice that the diagrams in Figures 4 and 5 use italicized text for the Bank
Account class name and withdrawal operation. This indicates that the Bank Account class is an abstract
class and the withdrawal method is an abstract operation. In other words, the Bank Account class provides
the abstract operation signature of withdrawal and the two child classes of Checking Account and Savings
Account each implement their own version of that operation.

However, super classes (parent classes) do not have to be abstract classes. It is normal for a standard class
to be a super class.

Associations
When you model a system, certain objects will be related to each other, and these relationships themselves
need to be modeled for clarity. There are five types of associations. I will discuss two of them — bi-
directional and uni-directional associations — in this section, and I will discuss the remaining three
association types in the Beyond the basics section. Please note that a detailed discussion of when to use
each type of association is beyond the scope of this article. Instead, I will focus on the purpose of each
association type and show how the association is drawn on a class diagram.

You might also like