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

OOSE Lab

The document discusses the basic concepts of the Unified Modeling Language (UML). UML is a graphical modeling language used to visualize, specify, construct, and document software systems. It uses standard graphical notations to create abstract models of real-world systems. UML has three main building blocks - things, relationships, and diagrams. Things represent system elements like classes and objects. Relationships illustrate connections between things like dependency and association. Diagrams are graphical representations that combine things and relationships to model different views of a system.

Uploaded by

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

OOSE Lab

The document discusses the basic concepts of the Unified Modeling Language (UML). UML is a graphical modeling language used to visualize, specify, construct, and document software systems. It uses standard graphical notations to create abstract models of real-world systems. UML has three main building blocks - things, relationships, and diagrams. Things represent system elements like classes and objects. Relationships illustrate connections between things like dependency and association. Diagrams are graphical representations that combine things and relationships to model different views of a system.

Uploaded by

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

Register No:921321104243

EX.NO: 1
Study the basic essentials of Unified Modelling Language
DATE:

Problem Statement:
This study aims to understand the basic concepts of Unified Modelling Language
and focus on design approach of UML.

Design Approach:

a) UML Synonyms:
UML is graphical modelling language in the field of Software Engineering.
UML is used to specify, visualize, construct, and document the artefacts (major
elements) of the software system. It provides a set of graphical notations and
concepts to represent the design and structure of systems, making it a widely
adopted tool for communication and collaboration among software developers and
stakeholders

b) Why to use UML?

 Complex applications need collaboration and planning from multiple teams


and hence require a clear and concise way to communicate amongst them.
 Businessmen do not understand code. So UML becomes essential to
communicate with non-programmers about essential requirements,
functionalities, and processes of the system.
 A lot of time is saved down the line when teams can visualize processes,
user interactions, and the static structure of the system.

c) Goal of UML
Modelling is a central part of all the activities that lead up to the deployment of
good software. We build models to
 Communicate the desired structure and behaviour of our system
 Visualize and control the system’s architecture
 Better understand the system we are building, often exposing
opportunities for simplification, reuse and manage risk.

d) Evolution of UML:
1) UML began in the mid-1990s as a common notation for software modelling.
2) UML 2.0 (2003) marked a major upgrade, introducing new diagrams and
improved precision.
3) Subsequent versions (UML 2.x) refined features and addressed issues.
4) UML 2.5 (2015) modernized UML, aligning it with agile development.
5) Ongoing efforts post-2017 aim to adapt UML to evolving software
engineering practices.

1
Register No:921321104243

e) UML Building Blocks:


UML is composed of three main building blocks, i.e., things, relationships, and
diagrams. Building blocks generate one complete UML model diagram by
rotating around several different blocks. It plays an essential role in developing
UML diagrams. The basic UML building blocks are enlisted below:
I. Things
II. Relationships
III. Diagrams

I. Things
Anything that is a real-world entity or object is termed as things. It can be
divided into several different categories:
i. Structural things
ii. Behavioural things
iii. Grouping things
iv. Annotational things
i. Structural things

Nouns that depicts the static behaviour of a model is termed as structural


things. They display the physical and conceptual components. They include class,
object, interface, node, collaboration, component, and a use case.

Class: A Class is a set of identical things that outlines the functionality and
properties of an object. It also represents the abstract class whose functionalities
are not defined. Its notation is as follows :

2
Register No:921321104243

Object: An individual that describes the behaviour and the functions of a system.
The notation of the object is similar to that of the class; the only difference is that the
object name is always underlined and its notation is given below:

Interface: A set of operations that describes the functionality of a class, which is


implemented whenever an interface is implemented.

Collaboration: It represents the interaction between things that is done to meet the
goal. It is symbolized as a dotted ellipse with its name written inside it.

Use case: Use case is the core concept of object-oriented modelling. It portrays a set
3
Register No:921321104243

of actions executed by a system to achieve the goal.

Actor: It comes under the use case diagrams. It is an object that interacts with the
system, for example, a user.

Component: It represents the physical part of the system.

Node: A physical element that exists at run time.

4
Register No:921321104243
ii. Behavioral Things

They are the verbs that encompass the dynamic parts of a model. It depicts the
behaviour of a system. They involve state machine, activity diagram, interaction
diagram, grouping things, annotation things

State Machine: It defines a sequence of states that an entity goes through in the
software development lifecycle. It keeps a record of several distinct states of a
system component.

Activity Diagram: It portrays all the activities accomplished by different entities


of a system. It is represented the same as that of a state machine diagram. It
consists of an initial state, final state, a decision box, and an action notation.

5
Register No:921321104243

Interaction Diagram: It is used to envision the flow of messages between several


components in a system.

iii. Grouping Things

It is a method that together binds the elements of the UML model. In UML, the
package is the only thing, which is used for grouping.

Package: Package is the only thing that is available for grouping behavioural and
structural things

iv. Annotation Things

It is a mechanism that captures the remarks, descriptions, and comments of


UML model elements. In UML, a note is the only Annotational thing.

Note: It is used to attach the constraints, comments, and rules to the elements of
the model. It is a kind of yellow sticky note.

6
Register No:921321104243

II. Relationships

It illustrates the meaningful connections between things. It shows the


association between the entities and defines the functionality of an application.
There are four types of relationships given below:

Dependency: Dependency is a kind of relationship in which a change in target


element affects the source element, or simply we can say the source element is
dependent on the target element. It is one of the most important notations in
UML. It depicts the dependency from one entity to another. It is denoted by a
dotted line followed by an arrow at one side as shown below,

Association: A set of links that associates the entities to the UML model. It tells
how many elements are actually taking part in forming that relationship. It is
denoted by a dotted line with arrowheads on both sides to describe the
relationship with the element on both sides.

Generalization: It portrays the relationship between a general thing (a parent


class or superclass) and a specific kind of that thing (a child class or subclass). It
is used to describe the concept of inheritance. It is denoted by a straight line
followed by an empty arrowhead at one side.

Realization: It is a semantic kind of relationship between two things, where one


defines the behaviour to be carried out, and the other one implements the
mentioned behaviour. It exists in interfaces. It is denoted by a dotted line with an
empty arrowhead at one side.

7
Register No:921321104243

III. Diagrams
The diagrams are the graphical implementation of the models that incorporate
symbols and text. Each symbol has a different meaning in the context of the
UML diagram. There are thirteen different types of UML diagrams that are
available in UML 2.0, such that each diagram has its own set of a symbol. And
each diagram manifests a different dimension, perspective, and view of the
system. UML diagrams are classified into three categories that are given below:
 Structural Diagram
 Behavioural Diagram
 Interaction Diagram

Structural Diagram: It represents the static view of a system by portraying the


structure of a system. It shows several objects residing in the system. Following
are the structural diagrams given below:

o Class diagram
o Object diagram
o Package diagram
o Component diagram
o Deployment diagram

Behavioural Diagram: It depicts the behavioural features of a system. It deals


with dynamic parts of the system. It encompasses the following diagrams:

o Activity diagram
o State machine diagram
o Use case diagram

Interaction diagram: It is a subset of behavioural diagrams. It depicts the


interaction between two objects and the data flow between them. Following are
the several interaction diagrams in UML:

o Timing diagram
o Sequence diagram
o Collaboration diagram

8
Register No:921321104243

f) UML diagram:

g) UML modelling types:


It is very important to distinguish between the UML model. Different diagrams are
used for different types of UML modelling. There are three important types of UML
modelling.
i.Structural Modeling
Structural modelling captures the static features of a system. They consist of the
following

 Classes diagrams
 Objects diagrams
 Deployment diagrams
 Package diagrams
 Composite structure diagram
 Component diagram

Structural model represents the framework for the system and this framework is
the place where all other components exist. Hence, the class diagram, component
diagram and deployment diagrams are part of structural modelling. They all
represent the elements and the mechanism to assemble them. The structural model
never describes the dynamic behaviour of the system. Class diagram is the most
widely used structural diagram.

ii. Behavioral Modeling

Behavioural model describes the interaction in the system. It represents the


interaction among the structural diagrams. Behavioural modelling shows the
dynamic nature of the system. They consist of the following

 Activity diagrams
 Interaction diagrams
 Use case diagrams

All the above show the dynamic sequence of flow in a system.

iii. Architectural Modeling

Architectural model represents the overall framework of the system. It contains


both structural and behavioural elements of the system. Architectural model can
be defined as the blueprint of the entire system. Package diagram comes under

9
Register No:921321104243

architectural modelling.

h) UML Notation:

This is just an extension to the UML building block section discussed in Chapter Two.

Structural Things

Graphical notations used in structural things are most widely used in UML. These are
considered as the nouns of UML models. Following are the list of structural things.

 Classes
 Object
 Interface
 Collaboration
 Use case
 Active classes
 Components
 Nodes

Class Notation
UML class is represented by the following figure. The diagram is divided into four parts.
 The top section is used to name the class.
 The second one is used to show the attributes of the class.
 The third section is used to describe the operations performed by the class.
 The fourth section is optional to show any additional components.

Classes are used to represent objects. Objects can be anything having properties and
responsibility.

10
Register No:921321104243

Object Notation
The object is represented in the same way as the class. The only difference is the name which is
underlined as shown in the following figure.

As the object is an actual implementation of a class, which is known as the instance of a class.
Hence, it has the same usage as the class.

Interface Notation

Interface is represented by a circle as shown in the following figure. It has a name which is
generally written below the circle.

Interface is used to describe the functionality without implementation. Interface is just like a
template where you define different functions, not the implementation. When a class
implements the interface, it also implements the functionality as per requirement.

Collaboration Notation

Collaboration is represented by a dotted eclipse as shown in the following figure. It has a name
written inside the eclipse.

11
Register No:921321104243

Collaboration represents responsibilities. Generally, responsibilities are in a group.

Use Case Notation

Use case is represented as an eclipse with a name inside it. It may contain additional
responsibilities.

Use case is used to capture high level functionalities of a system.

Actor Notation

An actor can be defined as some internal or external entity that interacts with the system.

12
Register No:921321104243

An actor is used in a use case diagram to describe the internal or external entities.

Initial State Notation

Initial state is defined to show the start of a process. This notation is used in almost all
diagrams.

The usage of Initial State Notation is to show the starting point of a process.

Final State Notation

Final state is used to show the end of a process. This notation is also used in almost all diagrams
to describe the end.

The usage of Final State Notation is to show the termination point of a process.

Active Class Notation

Active class looks similar to a class with a solid border. Active class is generally used to
describe the concurrent behavior of a system.

13
Register No:921321104243

Active class is used to represent the concurrency in a system.

Component Notation

A component in UML is shown in the following figure with a name inside. Additional elements
can be added wherever required.

Component is used to represent any part of a system for which UML diagrams are made.

Node Notation

A node in UML is represented by a square box as shown in the following figure with a name. A
node represents the physical component of the system.

Node is used to represent the physical part of a system such as the server, network, etc.

Behavioral Things

14
Register No:921321104243
Dynamic parts are one of the most important elements in UML. UML has a set of powerful
features to represent the dynamic part of software and non-software systems. These features
include interactions and state machines.

Interactions can be of two types −

 Sequential (Represented by sequence diagram)


 Collaborative (Represented by collaboration diagram)

Interaction Notation

Interaction is basically a message exchange between two UML components. The following
diagram represents different notations used in an interaction.

Interaction is used to represent the communication among the components of a system.

State Machine Notation

15
Register No:921321104243

State machine describes the different states of a component in its life cycle. The notations are
described in the following diagram.

State machine is used to describe different states of a system component. The state can be
active, idle, or any other depending upon the situation.

Grouping Things

Organizing the UML models is one of the most important aspects of the design. In UML, there
is only one element available for grouping and that is package.

Package Notation

Package notation is shown in the following figure and is used to wrap the components of a
system.

16
Register No:921321104243

Annotational Things
In any diagram, explanation of different elements and their functionalities are very important.
Hence, UML has notes notation to support this requirement.

Note Notation

This notation is shown in the following figure. These notations are used to provide necessary
information of a system.

Relationships
A model is not complete unless the relationships between elements are described properly.
The Relationship gives a proper meaning to a UML model. Following are the different types of
relationships available in UML.
 Dependency
 Association
 Generalization
 Extensibility

Dependency Notation

Dependency is an important aspect in UML elements. It describes the dependent elements and
the direction of dependency.

Dependency is represented by a dotted arrow as shown in the following figure. The arrow head

17
Register No:921321104243

represents the independent element and the other end represents the dependent element.

Dependency is used to represent the dependency between two elements of a system

Association Notation

Association describes how the elements in a UML diagram are associated. In simple words, it
describes how many elements are taking part in an interaction.

Association is represented by a dotted line with (without) arrows on both sides. The two ends
represent two associated elements as shown in the following figure. The multiplicity is also
mentioned at the ends (1, *, etc.) to show how many objects are associated.

Association is used to represent the relationship between two elements of a system.

Generalization Notation

Generalization describes the inheritance relationship of the object-oriented world. It is a parent


and child relationship.

Generalization is represented by an arrow with a hollow arrow head as shown in the following
figure. One end represents the parent element and the other end represents the child element.

18
Register No:921321104243

Generalization is used to describe parent-child relationship of two elements of a system.

Extensibility Notation

All the languages (programming or modeling) have some mechanism to extend its capabilities
such as syntax, semantics, etc. UML also has the following mechanisms to provide extensibility
features.

 Stereotypes (Represents new elements)


 Tagged values (Represents new attributes)
 Constraints (Represents the boundaries)

Extensibility notations are used to enhance the power of the language. It is basically additional
elements used to represent some extra behavior of the system. These extra behaviors are not
covered by the standard available notations.

i) Where to use UML?

 Software Development: UML is widely used in software engineering to


model and design software systems, including visualizing classes,
components, and interactions.

 System Architecture: UML diagrams like Component and Deployment


diagrams help architects represent the high-level structure and deployment
of systems.

19
Register No:921321104243
 Business Process Modelling: UML activity diagrams are employed to
model and understand business processes, aiding in business analysis and
improvement.

 Database Design: UML class diagrams can be used to model database


structures and relationships, facilitating the design of robust database
systems.

 Communication and Documentation: UML serves as a common language


for communication among stakeholders, including developers, testers, and
project managers. It also provides documentation for system understanding
and maintenance.

j) When to use UML?


 Complex Systems: Use UML when dealing with complex software systems
to provide a visual and structured representation of components, classes,
and their interactions.

 Team Collaboration: Employ UML when collaboration among team


members or stakeholders is crucial, as it serves as a standardized language
for communication and understanding.

 System Design and Redesign: Use UML during the design phase of
software development and when redesigning systems to ensure a clear and
comprehensive blueprint for implementation.

Conclusion:
Studying UML is crucial for software professionals, offering a standardized language
for effective communication, collaboration, systematic design and understanding
software systems.

20
Register No:921321104243

EX.NO: 2

DATE:

21

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy