Coupling and Cohesion - Software Engineering
Last Updated :
24 Apr, 2025
The purpose of the Design phase in the Software Development Life Cycle is to produce a solution to a problem given in the SRS(Software Requirement Specification) document. The output of the design phase is a Software Design Document (SDD).
Coupling and Cohesion are two key concepts in software engineering that are used to measure the quality of a software system's design.
What is Coupling and Cohesion?
Coupling refers to the degree of interdependence between software modules. High coupling means that modules are closely connected and changes in one module may affect other modules. Low coupling means that modules are independent, and changes in one module have little impact on other modules.
CouplingCohesion refers to the degree to which elements within a module work together to fulfill a single, well-defined purpose. High cohesion means that elements are closely related and focused on a single purpose, while low cohesion means that elements are loosely related and serve multiple purposes.
CohesionBoth coupling and cohesion are important factors in determining the maintainability, scalability, and reliability of a software system. High coupling and low cohesion can make a system difficult to change and test, while low coupling and high cohesion make a system easier to maintain and improve.
Basically, design is a two-part iterative process. The first part is Conceptual Design which tells the customer what the system will do. Second is Technical Design which allows the system builders to understand the actual hardware and software needed to solve a customer's problem.

Conceptual design of the system:
- Written in simple language i.e. customer understandable language.
- Detailed explanation about system characteristics.
- Describes the functionality of the system.
- It is independent of implementation.
- Linked with requirement document.
Technical Design of the System:
- Hardware component and design.
- Functionality and hierarchy of software components.
- Software architecture
- Network architecture
- Data structure and flow of data.
- I/O component of the system.
- Shows interface.
Modularization is the process of dividing a software system into multiple independent modules where each module works independently. There are many advantages of Modularization in software engineering. Some of these are given below:
- Easy to understand the system.
- System maintenance is easy.
- A module can be used many times as their requirements. No need to write it again and again.
Types of Coupling
Coupling is the measure of the degree of interdependence between the modules. A good software will have low coupling.
Types of CouplingFollowing are the types of Coupling:
- Data Coupling: If the dependency between the modules is based on the fact that they communicate by passing only data, then the modules are said to be data coupled. In data coupling, the components are independent of each other and communicate through data. Module communications don't contain tramp data. Example-customer billing system.
- Stamp Coupling In stamp coupling, the complete data structure is passed from one module to another module. Therefore, it involves tramp data. It may be necessary due to efficiency factors- this choice was made by the insightful designer, not a lazy programmer.
- Control Coupling: If the modules communicate by passing control information, then they are said to be control coupled. It can be bad if parameters indicate completely different behavior and good if parameters allow factoring and reuse of functionality. Example- sort function that takes comparison function as an argument.
- External Coupling: In external coupling, the modules depend on other modules, external to the software being developed or to a particular type of hardware. Ex- protocol, external file, device format, etc.
- Common Coupling: The modules have shared data such as global data structures. The changes in global data mean tracing back to all modules which access that data to evaluate the effect of the change. So it has got disadvantages like difficulty in reusing modules, reduced ability to control data accesses, and reduced maintainability.
- Content Coupling: In a content coupling, one module can modify the data of another module, or control flow is passed from one module to the other module. This is the worst form of coupling and should be avoided.
- Temporal Coupling: Temporal coupling occurs when two modules depend on the timing or order of events, such as one module needing to execute before another. This type of coupling can result in design issues and difficulties in testing and maintenance.
- Sequential Coupling: Sequential coupling occurs when the output of one module is used as the input of another module, creating a chain or sequence of dependencies. This type of coupling can be difficult to maintain and modify.
- Communicational Coupling: Communicational coupling occurs when two or more modules share a common communication mechanism, such as a shared message queue or database. This type of coupling can lead to performance issues and difficulty in debugging.
- Functional Coupling: Functional coupling occurs when two modules depend on each other's functionality, such as one module calling a function from another module. This type of coupling can result in tightly-coupled code that is difficult to modify and maintain.
- Data-Structured Coupling: Data-structured coupling occurs when two or more modules share a common data structure, such as a database table or data file. This type of coupling can lead to difficulty in maintaining the integrity of the data structure and can result in performance issues.
- Interaction Coupling: Interaction coupling occurs due to the methods of a class invoking methods of other classes. Like with functions, the worst form of coupling here is if methods directly access internal parts of other methods. Coupling is lowest if methods communicate directly through parameters.
- Component Coupling: Component coupling refers to the interaction between two classes where a class has variables of the other class. Three clear situations exist as to how this can happen. A class C can be component coupled with another class C1, if C has an instance variable of type C1, or C has a method whose parameter is of type C1,or if C has a method which has a local variable of type C1. It should be clear that whenever there is component coupling, there is likely to be interaction coupling.
Types of Cohesion
Cohesion is a measure of the degree to which the elements of the module are functionally related. It is the degree to which all elements directed towards performing a single task are contained in the component. Basically, cohesion is the internal glue that keeps the module together. A good software design will have high cohesion.
Types of CohesionFollowing are the Types of Cohesion:
- Functional Cohesion: Every essential element for a single computation is contained in the component. A functional cohesion performs the task and functions. It is an ideal situation.
- Sequential Cohesion: An element outputs some data that becomes the input for other element, i.e., data flow between the parts. It occurs naturally in functional programming languages.
- Communicational Cohesion: Two elements operate on the same input data or contribute towards the same output data. Example- update record in the database and send it to the printer.
- Procedural Cohesion: Elements of procedural cohesion ensure the order of execution. Actions are still weakly connected and unlikely to be reusable. Ex- calculate student GPA, print student record, calculate cumulative GPA, print cumulative GPA.
- Temporal Cohesion: The elements are related by their timing involved. A module connected with temporal cohesion all the tasks must be executed in the same time span. This cohesion contains the code for initializing all the parts of the system. Lots of different activities occur, all at unit time.
- Logical Cohesion: The elements are logically related and not functionally. Ex- A component reads inputs from tape, disk, and network. All the code for these functions is in the same component. Operations are related, but the functions are significantly different.
- Coincidental Cohesion: The elements are not related(unrelated). The elements have no conceptual relationship other than location in source code. It is accidental and the worst form of cohesion. Ex- print next line and reverse the characters of a string in a single component.
- Procedural Cohesion: This type of cohesion occurs when elements or tasks are grouped together in a module based on their sequence of execution, such as a module that performs a set of related procedures in a specific order. Procedural cohesion can be found in structured programming languages.
- Communicational Cohesion: Communicational cohesion occurs when elements or tasks are grouped together in a module based on their interactions with each other, such as a module that handles all interactions with a specific external system or module. This type of cohesion can be found in object-oriented programming languages.
- Temporal Cohesion: Temporal cohesion occurs when elements or tasks are grouped together in a module based on their timing or frequency of execution, such as a module that handles all periodic or scheduled tasks in a system. Temporal cohesion is commonly used in real-time and embedded systems.
- Informational Cohesion: Informational cohesion occurs when elements or tasks are grouped together in a module based on their relationship to a specific data structure or object, such as a module that operates on a specific data type or object. Informational cohesion is commonly used in object-oriented programming.
- Functional Cohesion: This type of cohesion occurs when all elements or tasks in a module contribute to a single well-defined function or purpose, and there is little or no coupling between the elements. Functional cohesion is considered the most desirable type of cohesion as it leads to more maintainable and reusable code.
- Layer Cohesion: Layer cohesion occurs when elements or tasks in a module are grouped together based on their level of abstraction or responsibility, such as a module that handles only low-level hardware interactions or a module that handles only high-level business logic. Layer cohesion is commonly used in large-scale software systems to organize code into manageable layers.
Advantages of Low coupling
- Improved maintainability: Low coupling reduces the impact of changes in one module on other modules, making it easier to modify or replace individual components without affecting the entire system.
- Enhanced modularity: Low coupling allows modules to be developed and tested in isolation, improving the modularity and reusability of code.
- Better scalability: Low coupling facilitates the addition of new modules and the removal of existing ones, making it easier to scale the system as needed.
Advantages of High cohesion
- Improved readability and understandability: High cohesion results in clear, focused modules with a single, well-defined purpose, making it easier for developers to understand the code and make changes.
- Better error isolation: High cohesion reduces the likelihood that a change in one part of a module will affect other parts, making it easier to
- Improved reliability: High cohesion leads to modules that are less prone to errors and that function more consistently,
- leading to an overall improvement in the reliability of the system.
Disadvantages of High coupling
- Increased complexity: High coupling increases the interdependence between modules, making the system more complex and difficult to understand.
- Reduced flexibility: High coupling makes it more difficult to modify or replace individual components without affecting the entire system.
- Decreased modularity: High coupling makes it more difficult to develop and test modules in isolation, reducing the modularity and reusability of code.
Disadvantages of Low cohesion
- Increased code duplication: Low cohesion can lead to the duplication of code, as elements that belong together are split into separate modules.
- Reduced functionality: Low cohesion can result in modules that lack a clear purpose and contain elements that don't belong together, reducing their functionality and making them harder to maintain.
- Difficulty in understanding the module: Low cohesion can make it harder for developers to understand the purpose and behavior of a module, leading to errors and a lack of clarity.
Conclusion
In conclusion, it's good for software to have low coupling and high cohesion. Low coupling means the different parts of the software don't rely too much on each other, which makes it safer to make changes without causing unexpected problems. High cohesion means each part of the software has a clear purpose and sticks to it, making the code easier to work with and reuse. Following these principles helps make software stronger, more adaptable, and easier to grow.
Similar Reads
Software Engineering Tutorial Software Engineering is a subdomain of Engineering in which you learn to develop, design, test, and maintain software using a systematic and structured approach. Software is a collection of programs. And that programs are developed by software engineers In this Software Engineering Tutorial, you wil
7 min read
Software Engineering Basics
Introduction to Software EngineeringSoftware is a program or set of programs containing instructions that provide the desired functionality. Engineering is the process of designing and building something that serves a particular purpose and finds a cost-effective solution to problems. Table of ContentWhat is Software Engineering?Key P
11 min read
Software Development Life Cycle (SDLC)Software development life cycle (SDLC) is a structured process that is used to design, develop, and test good-quality software. SDLC, or software development life cycle, is a methodology that defines the entire procedure of software development step-by-step. The goal of the SDLC life cycle model is
11 min read
Software Quality - Software EngineeringTraditionally, a high-quality product is outlined in terms of its fitness of purpose. That is, a high-quality product will specifically be what the users need to try. For code products, the fitness of purpose is typically taken in terms of satisfaction of the wants arranged down within the SRS docum
5 min read
ISO/IEC 9126 in Software EngineeringThe International Organization for Standardization (ISO) has established a series of ISO and ISO/IEC standards for software quality. Starting with the ISO 9000-3 instructions for implementing the ISO 9001 standard, which is concerned with quality assurance processes, to the creation, supply, install
4 min read
Boehm's Software Quality ModelIn 1978, B.W. Boehm introduced his software quality model, which defines software quality through a hierarchical structure of attributes and metrics. This model is similar to the McCall Quality Model but encompasses a wider range of characteristics, including hardware performance-related ones. Boehm
4 min read
Software Crisis - Software EngineeringThe term "software crisis" refers to the numerous challenges and difficulties faced by the software industry during the 1960s and 1970s. It became clear that old methods of developing software couldn't keep up with the growing complexity and demands of new projects. This led to high costs, delays, a
3 min read
Software Measurement & Metrices
Software Measurement and MetricsSoftware Measurement: A measurement is a manifestation of the size, quantity, amount, or dimension of a particular attribute of a product or process. Software measurement is a titrate impute of a characteristic of a software product or the software process. Table of Content Software Measurement Prin
4 min read
People Metrics and Process Metrics in Software EngineeringPeople Metrics and Process Metrics, both play important roles in software development. People Metrics helps in quantifying the useful attributes whereas Process Metrics creates the body of the software. People metrics focus on how well team members work together and their overall satisfaction, while
8 min read
Halsteadâs Software Metrics - Software EngineeringHalstead's Software metrics are a set of measures proposed by Maurice Halstead to evaluate the complexity of a software program. These metrics are based on the number of distinct operators and operands in the program and are used to estimate the effort required to develop and maintain the program. T
11 min read
Cyclomatic ComplexityCyclomatic complexity, developed by Thomas McCabe, is a metric that measures the complexity of a program by counting its decision points. It measures the number of unique paths through the code, indicating how complex the logic is. Lower complexity suggests simpler, more manageable code, reducing th
6 min read
Functional Point (FP) Analysis - Software EngineeringFunctional Point Analysis (FPA) is a software measurement technique used to assess the size and complexity of a software system based on its functionality. It involves categorizing the functions of the software, such as input screens, output reports, inquiries, files, and interfaces, and assigning w
8 min read
Lines of Code (LOC) in Software EngineeringA line of code (LOC) is any line of text in a code that is not a comment or blank line, and also header lines, in any case of the number of statements or fragments of statements on the line. LOC consists of all lines containing the declaration of any variable, and executable and non-executable state
4 min read
Software Development Models & Agile Methods
Waterfall Model - Software EngineeringThe Waterfall Model is a Traditional Software Development Methodology. It was first introduced by Winston W. Royce in 1970. It is a linear and sequential approach to software development that consists of several phases. This classical waterfall model is simple and idealistic. It is important because
13 min read
What is Spiral Model in Software Engineering?The Spiral Model is one of the most important SDLC model. The Spiral Model is a combination of the waterfall model and the iterative model. It provides support for Risk Handling. The Spiral Model was first proposed by Barry Boehm. This article focuses on discussing the Spiral Model in detail.Table o
9 min read
Prototyping Model - Software EngineeringPrototyping Model is a way of developing software where an early version, or prototype, of the product is created and shared with users for feedback. The Prototyping Model concept is described below: Table of ContentWhat is Prototyping Model?Phases of Prototyping ModelTypes of Prototyping ModelsAdva
7 min read
Incremental Process Model - Software EngineeringThe Incremental model is a software Development approach which is used to breakdown the project into smaller and easily manageable parts. In these, each part passes through Requirement, Design, Testing phases and Implementation phase. The overall process continue until we got the complete System.Inc
6 min read
Rapid Application Development Model (RAD) - Software EngineeringThe RAD model or Rapid Application Development model is a type of software development methodology that emphasizes quick and iterative release cycles, primarily focusing on delivering working software in shorter timelines. Unlike traditional models such as the Waterfall model, RAD is designed to be
9 min read
Coupling and Cohesion - Software EngineeringThe purpose of the Design phase in the Software Development Life Cycle is to produce a solution to a problem given in the SRS(Software Requirement Specification) document. The output of the design phase is a Software Design Document (SDD). Coupling and Cohesion are two key concepts in software engin
10 min read
Agile Software Development - Software EngineeringAgile Software Development is a Software Development Methodology that values flexibility, collaboration, and customer satisfaction. It is based on the Agile Manifesto, a set of principles for software development that prioritize individuals and interactions, working software, customer collaboration,
15+ min read
SRS & SPM
Software Requirement Specification (SRS) FormatIn order to form a good SRS, here you will see some points that can be used and should be considered to form a structure of good Software Requirements Specification (SRS). These are below mentioned in the table of contents and are well explained below. Table of ContentIntroductionGeneral description
5 min read
Software Engineering | Quality Characteristics of a good SRSRelated Article: Writing a good SRS for your project Quality characteristics of a good Software Requirements Specification (SRS) document include:Complete: The SRS should include all the requirements for the software system, including both functional and non-functional requirements.Consistent: The S
7 min read
Software Project Management (SPM) - Software EngineeringSoftware Project Management (SPM) is a proper way of planning and leading software projects. It is a part of project management in which software projects are planned, implemented, monitored, and controlled. In this article, we are discussing Software Project Management (SPM) topics that are useful
8 min read
COCOMO Model - Software EngineeringThe Constructive Cost Model (COCOMO) It was proposed by Barry Boehm in 1981 and is based on the study of 63 projects, which makes it one of the best-documented models. It is a Software Cost Estimation Model that helps predict the effort, cost, and schedule required for a software development project
15+ min read
Capability Maturity Model (CMM) - Software EngineeringThe Capability Maturity Model (CMM) is a tool used to improve and refine software development processes. It provides a structured way for organizations to assess their current practices and identify areas for improvement. CMM consists of five maturity levels: initial, repeatable, defined, managed, a
11 min read
Integrating Risk Management in SDLC | Set 1The Software Development Life Cycle (SDLC) is a conceptual model for defining the tasks performed at each step of the software development process. This model gives you a brief about the life cycle of Software in the development phase. In this particular article, we are going to discuss risk managem
8 min read
Software Maintenance - Software EngineeringSoftware Maintenance refers to the process of modifying and updating a software system after it has been delivered to the customer. This involves fixing bugs, adding new features, and adapting to new hardware or software environments. Effective maintenance is crucial for extending the software's lif
14 min read
Testing & Debugging
What is Software Testing?Software testing is an important process in the Software Development Lifecycle(SDLC). It involves verifying and validating that a Software Application is free of bugs, meets the technical requirements set by its Design and Development, and satisfies user requirements efficiently and effectively.Here
11 min read
Types of Software TestingSoftware testing is a important of software development life-cycle that ensures a product works correctly, meets user expectations, and is free of bugs. There are different types of software testing, each designed to validate specific aspects of an application, such as functionality, performance, se
15+ min read
Testing Guidelines - Software EngineeringSoftware testing is an essential component of software development, ensuring that applications function correctly, meet user expectations, and are ready for deployment. Effective software testing involves a structured approach guided by well-defined principles and best practices. This article explor
3 min read
What is Debugging in Software Engineering?Debugging in Software Engineering is the process of identifying and resolving errors or bugs in a software system. It's a critical aspect of software development, ensuring quality, performance, and user satisfaction. Despite being time-consuming, effective debugging is essential for reliable and com
11 min read
Verification & Validation
Practice Questions