Sobes.tech
Junior — Middle

Can you explain what is meant by the level of cohesion within a software module or system?

sobes.tech AI

Answer from AI

Coupling level is a measure of how strongly components or modules of a program depend on each other. The higher the coupling, the more tightly modules are connected, making them harder to modify or test separately.

Low coupling is when modules minimally depend on each other, which improves modularity and makes code maintenance easier.

Example:

  • Module A calls functions of Module B through a clearly defined interface — low coupling.
  • Module A directly uses internal data of Module B — high coupling.

The goal is to achieve low coupling and high internal cohesion (when elements within a module are closely related to each other).