written 8.4 years ago by | • modified 8.4 years ago |
Mumbai University > Computer Engineering > Sem6 > Software Engineering
Marks: 10M
Year: Dec 2015
written 8.4 years ago by | • modified 8.4 years ago |
Mumbai University > Computer Engineering > Sem6 > Software Engineering
Marks: 10M
Year: Dec 2015
written 8.4 years ago by |
Cohesion:
With the help of cohesion the information hiding can be done.
A cohesive subsystem performs only “one task” in software procedure with little interaction with other modules. In other cohesive subsystem performs only one thing.
Different types of cohesion:
1. Coincidentally cohesive: The subsystem sin which the set of tasks are related with each other loosely then such subsystems are called coincidentally cohesive.
2. Logically cohesive: A subsystem that performs the tasks that are logically related with each other is called logically cohesive.
3. Temporal cohesive: The subsystem in which the tasks need to be executed in some specific time span is called temporal cohesive.
4. Procedural cohesive: When processing elements of a subsystem are related with one another and must be executed in some specific order, such subsystems is called Procedural cohesive.
5. Communication cohesion: when the processing elements of a subsystem share the data then such subsystem is called communication cohesive.
6. Sequential cohesion: when the output of 1 subsystem is given as input for other subsystem is called Sequential cohesion.
Following fog shows layer cohesion.
Coupling:
5. Data coupling: The data coupling is possible by parameter passing or data interaction.
6. Control coupling: The modules share related control data in control coupling.
7. Common coupling: In common coupling common data or global data is shared among the modules.
8. Content coupling: Content coupling occurs when one module makes use of data or control information maintained in another module.
Example:
Example of Low Cohesion:
As for coupling, it refers to how related are two classes / modules and how dependent they are on each other. Being low coupling would mean that changing something major in one class should not affect the other. High coupling would make your code difficult to make changes as well as to maintain it, as classes are coupled closely together, making a change could mean an entire system revamp.
All good software design will go for high cohesion and low coupling.