UML Building Blocks
UML Building Blocks
UML Building Blocks
INTRODUCTION
• UML stands for unified modeling language which revolves around
various blocks to generate a single model.
• Building blocks are the things required to develop one full UML
model diagram.
• It is an essential part of every UML diagram.
The basic UML building blocks:
• Things
• Relationships
• Diagrams
• Things
• A thing can be described as any real-world entity or an object. Things are
divided into various categories in UML as follows,
• Structural things
• Behavioral things
• Grouping things
• Annotational things
Things
• Four Types
• Structural things -- The nouns of UML models. These represent elements that are
conceptual or physical. There are seven kinds of structural things: Class, Interface,
Collaboration, Use Case, Active Class, Component, and Node.
• Behavioral things -- Dynamic parts of UML models. The verbs which represent
behavior over time and space. There are two kinds of behavioral things:
Interaction, and State Machine. Grouping things -- Organizational parts of UML.
These are boxes into which models can be decomposed. There is only one kind of
grouping thing, the Package.
• Annotational things -- Explanatory parts of UML. Used to describe, illuminate, and
remark any element of a model. There is only one kind of annotational thing, the
Note.
Structural things
• A structural thing is used to describe the static part of a model. It is
used to represent the things that are visible to human eyes.
• Structural things are all about the physical part of a system.
• It is the noun of a UML model, such as a class, object, interface,
collaboration, use case, component, and a node.
• There are seven kinds of structural things:
• Class, Interface, Collaboration,
• Use Case, Active Class, Component,
• and Node.
Class:
• A class is used to represent various
objects.
• It is used to define the properties and
operations of an object.
• In UML, we can also represent an
abstract class.
• A class whose functionalities are not
defined is called an abstract class.
• Any UML class notation is generally
expressed as :
Object:
• Class Diagram Illustrates data models for even very complex information
systems
• It provides an overview of how the application is structured before
studying the actual code.
• This can easily reduce the maintenance time
• It helps for better understanding of general schematics of an application.
• Allows drawing detailed charts which highlights code required to be
programmed
• Helpful for developers and other stakeholders.
elements of A UML class diagram
• Following rules must be taken
• Class Name care of while representing a class:
• Attributes • A class name should always start
with a capital letter.
• Operations
• A class name should always be in
the center of the first
compartment.
• A class name should always be
written in bold format.
• An abstract class name should be
written in italics format.
Attributes:
• A derived attribute is computed
• An attribute is named property from other attributes. For
of a class which describes the example, an age of the student
object being modeled. In the can be easily computed from
class diagram, this component is his/her birth date.
placed just below the name-
compartment.
Attributes characteristics
• The attributes are generally written along with the visibility factor.
• Public, private, protected are the four visibilities which are denoted
by +, -, #, respectively.
• Visibility describes the accessibility of an attribute of a class.
• Attributes must have a meaningful name that describes the use of it
in a class.
Relationships Dependency