Ad Code

Cohesion and Coupling creates confusion Explain?

Cohesion and Coupling creates confusion , please explain these two concept simply ?



A complex system may be divided into smaller pieces of lesser complexity called modules. They modules may be linked with one another to perform some functionality. Coupling is a measure of independence of a module. In case of less coupling, a module does not rely too much on some other module for its functionalities. Coupling is considered a bad thing from design point of view because in case of high coupling between some modules, it is difficult to maintain the system as change in one module effects other modules as well. A good software design is one with loose or almost no coupling between the modules.

Now, in a system, a module may be further divided into different parts or components. Cohesion describes how closely different components of a modules are linked to each other. If different components of a module are very closely related to each other then it shows high cohesion in that module because in that case, if you want to make some change in one module then you will find all the components of that module as one place since these components are closely related to each other.

Although Coupling and Cohesion are contrasting concepts but two are indirectly related to each other. A system with high coupling between modules results into low cohesion within a single module. If the coupling between different modules of a system is reduced that in turn increases the cohesion in a module.
Reactions

Post a Comment

0 Comments