I have been reading up on the seminal and excellent book Code Complete. It discusses about the various kinds of couplings that can happen between modules(which may be classes as well as methods):
- Simple-data-parameter-coupling
- Simple-object-coupling
- Object-parameter-coupling
- Semantic coupling
The book has to say this about object-parameter coupling :
Two modules are object -parameter coupled to each other if
Object1
requiresObject2
to pass it anObject3
. This kind of coupling is tighter thanObject1
requiringObject2
to pass it only primitive data types because it requiresObject2
to know aboutObject3
.
What is the author trying to mean here?