Coupling

Coupling is a much stronger and useful criterion than cohesion. It describes the interface, or flow of data values, between a called function (a server function) and a calling function (a client function).

Coupling can be implicit, with functions communicating through global variables, or explicit, when the client and server functions communicate through parameters. Implicit coupling is higher—it results in a higher degree of dependency between the client and server functions. Explicit coupling is lower: When functions communicate through parameters, it is easier to understand, reuse, and modify them.

The intensity of coupling is described by the number of values that flow from the client function to the server function and back. A ...

Get Core C++ A Software Engineering Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.