Seminar Topics & Project Ideas On Computer Science Electronics Electrical Mechanical Engineering Civil MBA Medicine Nursing Science Physics Mathematics Chemistry ppt pdf doc presentation downloads and Abstract

Full Version: Coupling and Cohesion
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Coupling and Cohesion


[attachment=37156]

Definition of Coupling

• The degree of interdependence between two
or more components.
– Reducded coupling Þ Reduced Complexity
• Make components as independent as
possible.
– Eliminate unnecessary relationships
– Ease the tightness of necessary relationships.


The fewer the connection, the less chance
there is for the ripple effect.
– Ideally, changing one component should not
require a change in another.
– Should not have to understand details of one
component in order to change another (c.f.
principle of locality).



Coupling Principles
• Create narrow connections
• Create direct Connections
• Create local connections
• Create obvious connections
• Create flexible connections



Direct vs. Indirect Connections

• A direct connection is one in which the
interface between two components can be
understood without having to refer to other
prices of information.
– A method definition including pre- and
postconditions has a more direct interface than
one that does not.



Local vs. Remote Connections
• Local Connection
– All information required to understand
theconnection is present in the connection
itself.
• Remote Connection
– Coupled through global data.
– May be hundreds of lines removed from a call
point.