Cohesion and its Types
In contrast to measuring the interdependence among multiple modules, cohesion refers to the reliance or dependence within and among the module's internal elements such as data, internal, functions modules. The more cohesive a module, the more closely related its pieces are, both to each other and to the module's singular purpose. A module that serves multiple purposes is at greater risk of its elements needing to evolve in different ways or at different rates. For example, a module that encompasses both the data and routines for displaying those data may change frequently and may grow in different directions, as new uses of the data require both new functions to manipulate data and new ways of visualizing them. Instead, our design goal is to make each module as cohesive as possible, so that each module is easier to understand and is less likely to change. Figure 6.5 shows the several types of cohesion.
The worst degree of cohesion, coincidental, is found in a module whose parts are unrelated to one another. In this case, unrelated functions, processes, or data arc combined in the same module for reasons of convenience or serendipity. For example, it is not uncommon for a mediocre design to consist of several cohesive modules, with the rest of the system's functionality clumped together into the modules Miscellaneous A and Miscellaneous B. A module has logical cohesion if its parts are related only by the logic structure of its code.
There are several types of cohesions and some of the main types of cohesion are as follows:
Questionnaire:
| Name* : |
|||||
| Email* : |
|||||
| Country* : |
|||||
| Phone* : |
|||||
| Subject* : |
|||||
| Upload Homework : Upload another homework (upto 5 uploads max.)
|
|||||
| Due Date |
Time |
AM/PM |
Timezone |
||
| Instructions |
|||||
|
|||||