Home » Software Engineering

Cohesion | Software Engineering

This article is an introduction to a very popular term related to software development: Cohesion. In this article, we are going to learn what this term means and how is it connected to software development?
Submitted by Monika Sharma, on October 13, 2019


In general terms, the word cohesion means 'the action or act of forming a united whole'. According to the definition of Cambridge University, cohesion is defined as "the state of sticking together, or being in close agreement and working well together".

Now, if we talk about software, the developers and researchers nowadays are trying to develop software in a component-based approach. In this, the entire software is divided into different modules. These modules are developed independently and are capable of performing some specific functionality. Now, for the software to be efficient, these modules must have high cohesion. What this means is that the same types of functionalities and behavior must be performed by a single module. Now, as the same type of functionalities is performed in a united way together in a single module, the quality of the software will automatically increase, and also the component-based structure of the software would make it easier for the developers to understand it better and handle it efficiently in case of error and bugs.

Now, the cohesion of a module is further classified into different classes. This classification is done based on the level of cohesion that a particular module possesses. The different classes of cohesion are as follows:

cohesion in software engineering

The sequence of the given classification is from high to low in a top-to-down manner. Now, let us define each of them to understand what they mean:

Functional Cohesion: If a single module aims to perform all the similar types of functionalities through its different elements, then the module is said to exhibit functional cohesion.

Sequential Cohesion: In the sequential cohesion, the different elements of a module form a series, in which the output of one element treats as an input to the other elements inside the same module. Hence, a sequence inside the module is formed.

Communicational Cohesion: If all the elements of a module are working on the same data and are accessing that data through the same data structures, then this is called communicational cohesion.

Procedural Cohesion: If all the elements of a module are a part of the same procedure, i.e. algorithm, then that particular module is said to possess procedural cohesion.

Temporal Cohesion: In the temporal cohesion, the different elements of a module are united through the time stamp. All these elements of the module will work in the same timestamp, and here, the time is handled strictly. The login and shutdown processes are very good examples of temporal cohesion.

Logical Cohesion: A module is said to exhibit logical cohesion if all its elements perform the same type of logical operations. For example, if a module is performing the sorting operation, then all the processes that need to perform sorting in them will be handled by this module only.



Comments and Discussions



Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© some rights reserved.