Cohesion:
Cohesion is the indication of the relationship within the module. It is the concept of intra-module. Cohesion has many types but usually, high cohesion is good for software.
Coupling:
Coupling is also the indication of the relationships between modules. It is the concept of the Inter-module. The coupling has also many types but usually, the low coupling is good for software.
Now we will see the difference between Cohesion and Coupling. the differences between cohesion and coupling are given below:
Cohesion | Coupling |
---|---|
Cohesion is the concept of intra-module. | Coupling is the concept of inter-module. |
Cohesion represents the relationship within a module. | Coupling represents the relationships between modules. |
Increasing cohesion is good for software. | Increasing coupling is avoided for software. |
Cohesion represents the functional strength of modules. | Coupling represents the independence among modules. |
Highly cohesive gives the best software. | Whereas loosely coupling gives the best software. |
In cohesion, the module focuses on a single thing. | In coupling, modules are connected to the other modules. |
Cohesion is created between the same module. | Coupling is created between two different modules. |
There are Six types of Cohesion 1. Functional Cohesion. |
There are Six types of Coupling 1. Common Coupling. |