Contact Us

WhatsApp:+8613083988828

Fax:+86-571-88220651

Mail:sales@gear-sprocket.com

Add:Shenhua Road, Hangzhou, Zhejiang, China

Home > News > Content
Cohesion And Coupling Dec 17, 2019

Cohesion and coupling


Cohesion indicates the closeness of the combination of various elements in a module. It is a natural extension of the concept of information hiding and localization. Cohesion is to measure the connections within a module from a functional perspective. A good cohesion module should do exactly one thing. It describes the functional connections within the module. Coupling is a measure of the interconnection between modules in a software structure. The strength of coupling depends on the complexity of the interface between modules, the point of entering or accessing a module, and the data passing through the interface. The program pays attention to low coupling and high cohesion. That is, the elements in the same module must be highly close, but the interdependence between the modules is not so close. 

Cohesion and coupling are closely related. A module with high coupling with other modules means low cohesion, and a module with high cohesion means low coupling between this module and other modules. In software design, we should strive for high cohesion and low coupling.