Page 138 - DCAP405_SOFTWARE_ENGINEERING
P. 138
Unit 8: Design Engineering
Functional Dependence: Designing modules in such a way that each module has specific functional Notes
requirements. Functional independence are measured using two terms cohesion and coupling.
Did u know? What is the basic difference between the Coupling and Cohesion?
The difference between Coupling and Cohesion is a distinction on a process of change, not
a static analysis of code’s quality.
A Coupling and Cohesion Measurement
Decomposition is one of the oldest and most fundamental techniques employed in software
engineering. It results in a good system design which consists of relatively independent
components which interact only in order to achieve system goals.
We can model a real-world problem by breaking it up into more manageable sub-problems
until these are small enough to be represented accurately. The problem is then defined by the
representations of the subproblems and the relationships between them. Similarly, our design
and subsequent implementation will also consist of a number of related parts. Although the
terms used to denote the parts (subsystems, modules, classes, components, . . . ) and relationships
have changed over the years the benefits of a modular system have endured. The basic idea is
simple: put things that belong together in one place. This leads to independent ‘pluggable’
modules which are easy to develop, maintain and replace and which present simple interfaces to
clients.
As always, there is a catch. There is no single correct way to perform decomposition and different
choices can lead to different designs with very different properties. For example, techniques
based on decomposition with respect to data flow tend to produce different results to those of
techniques based on decomposition with respect to control.
A related problem is assessing the degree to which each module’s contents ‘belong together’ and
the relative independence of modules. Cohesion is a measure of internal module strength while
coupling describes the strength of inter-module relationships. They are not independent coupling
is lowered (and cohesion raised) when communicating activities are located in the same module.
Cohesion and coupling are an ingredient in many design techniques.
The advent of object-oriented software development has brought many benefits but has added
further complexity to the concepts of cohesion and coupling by increasing the number of available
component and relationship types. For example, in conventional procedural languages such as
Pascal or C the dominant relationship is procedure invokes procedure. In OO languages
components include methods, classes and packages while relationships include association,
inheritance and containment in addition to invocation. Only for very small systems is a subjective
assessment of the levels of cohesion possible and sufficient. Measures which are more objective
and amenable to automated collection are required for systems of realistic size. Cohesion is
multi-faceted, involving complex interactions between many components, and it is not possible
to represent it adequately with only scalar quantitative metrics without significant loss of
information. Software visualization excels in problem domains having many variables, complex
interactions and large data volumes.
Did u know? What is the importance of software visualization in software engineering?
Software visualization involves applying information visualization principles to the
software engineering domain.
LOVELY PROFESSIONAL UNIVERSITY 131