Home » Software Engineering

Coupling | Software Engineering

This article is an introduction to a very popular term related to software development: Coupling. 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

Coupling

In general terms, the term coupling is defined as a thing that joins together two objects. If we talk about software development, then the term coupling is related to the connection between two modules, i.e. how tight interaction do the two modules hold with each other is defined by coupling.

Hence, the term coupling is defined as follows: "“The measure of the degree of the interdependency of two modules on each other is known as coupling."

It should be noted that a module that has high cohesion and low coupling is functionally independent.

How can the coupling between two modules be defined?

The interconnection of interdependency between two modules is defined by the interface between them because any two modules cannot be connected if there exists no interface between them. Now, the level of coupling that exists among the two modules is defined by the number of data transfers that take place among them. If any of the modules (or both) is highly dependent on the data that the other module provides to it, then we say that the two modules are highly coupled. Else, we say that the two modules are loosely coupled or the coupling between the modules is low.

Now, the term coupling is further classified into different classes which help us to quantitatively determine the level of coupling between two modules. The different classes of coupling are as follows:

coupling 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:

Content Coupling: In the content coupling, the two modules are connected as they share the same content. What this means is that the content, i.e. the code of both the modules, has some parts in common which are the functions and methods that are used by both of the modules. This type of coupling is termed to be the strongest type of coupling.

Common Coupling: Two modules are said to be commonly coupled if they share the data using the same data items (i.e. the variables). These data items must be in global access to both of the modules so that both the modules can be able to access these data items.

Control Coupling: If the data from the module is responsible for controlling the activities happening in another module, then these modules are said to be control coupled. Here, mostly, one or two bits of signal data are passed which controls the operations happening in some other module. A well-known example of this can be the set of flags of a module by some other module.

Stamp Coupling: Two modules are said to be stamp coupled if they both use a composite data item to interact with each other.

Data Coupling: This type of coupling is the weakest one. Two modules are said to be data coupled if they communicate through some parameters. An example can be of the parameters that are passed to a function block.






Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.




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


© https://www.includehelp.com some rights reserved.