What is Cohesion?
In computer programming, cohesion defines the relationship within a module, or we can say that Cohesion specifies up to which extent the components of a module belong together. It estimates the strength and stability of relationships between elements of functionality within a provided module.
What is Coupling?
In software engineering, coupling is the extent of interrelationship and connection between software modules. It helps in estimating how closely linked two modules are.
Differences between Cohesion and Coupling
S.No. |
Cohesion |
Coupling |
1 | Cohesion is all about the intra-module. | Coupling is all about the inter-module. |
2 | It reflects the relationship and association within a module. | It reflects the relationships between modules. |
3 | Cohesion describes the functional stability of modules. | Coupling describes independence among modules. |
4 | Highly cohesion is the best for software. | Loose coupling is the best for software. |
5 | When it comes to cohesion, the module concentrates only on a single thing. | When it comes to coupling, the modules are associated with the other modules. |
Keep learning and stay tuned to get the latest updates on GATE along with GATE Preparation Books & GATE Answer Key and more.
Comments