Cohesion:-Cohesion is a natural extension of the information hiding concept. A cohesive module performs a single task within a software procedure, requiring little interaction with procedures being performed in other parts of a program.Cohesion may be represented as a 'spectrum.' We always strive for high cohesion, although the mid-range of the spectrum is often acceptable.
Cohesion is an ordinal type of measurement and is usually expressed as “high cohesion” or “low cohesion” when being discussed. Modules with high cohesion tend to be preferable because high cohesion is associated with several desirable traits of software including robustness, reliability, reusability, and understandability whereas low cohesion is associated with undesirable traits such.
The scale for cohesion is nonlinear.Types of cohesion:-1. Coincidental cohesion2.
Logical cohesion3. Temporal cohesion4. Communicational cohesion5. Sequential cohesionCoincidental cohesion:-This occurs when there is no relationship among elements of a module.
They can occur if an existing program modularized by chopping it into pieces and making differ piece of modules i.e. It performs a set of tasks that are related to each other very loosely.
The modules contain a random collection of function.Logical cohesion:-A module having logical cohesion if there are some logical relationship between elements of a modules i.e. Elements of a module performs the operation.Temporal cohesion:-It is same as logical cohesion except that the element must be executed in same time. Set of function responsible for initialization, startup, the shutdown of the same process.
It is higher than logical cohesion since all elements are executed together. This avoids the problem of passing the flag.Communicational cohesion:-A module is said to have Communicational cohesion if all function of module refers to an update the same data structure.Sequential cohesion:-A module is said to have sequential cohesion if element module from different parts of the sequence.
When the output from one element of the sequence is input to the next element of a sequence. A sequence bounded module may contain several functions or part of different functions.Functional cohesion:-It is the strongest cohesion in a functional bound module, all elements of the module are related to performing a single function. By function we not mean simply mathematical function but also these modules which have single goal function like computing square root and sort array are a clear example of functionality cohesion modules.Coupling:-Coupling is a measure that defines the level of inter-dependability among modules of a program. It tells at what level the modules interfere and interact with each other.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |