0
3.2kviews
Explain the term cohesion and coupling .Explain the purpose of modular design.

Subject: Software Engineering

Topic: Design Engineering

Difficulty: High

1 Answer
0
66views

Cohesion: Cohesion can be defined as the degree of the closeness of the relationship between its components. In general, it measures the relationship strength between the pieces of functionality within a given module in the software programming. It is an ordinal type of measurement, which is described as low cohesion or high cohesion.

In a good module, the various parts having high cohesion is preferable due to its association with many desirable traits of the software such as reliability, re-usability, robustness and understand-ability. On the other hand, a low cohesion is associated with the undesirable traits, including difficulty in maintaining, reusing and understanding. If the functionalities embedded in a class have much in common, then the cohesion will be increased in a system.

  • High cohesion leads to the increased module re-usability because the developers of the application will easily find the component they look for in the cohesive set of operations offered by the module.

  • The system maintainability will be increased due to logical changes in the domain effecting fewer modules.

  • The module complexity also reduces, when there is a high cohesion in the programming.

enter image description here

Coupling: In software engineering, the coupling can be defined as the measurement to which the components of the software depend upon each other. Normally, the coupling is contrasted with the cohesion. If the system has a low coupling, it is a sign of a well-structured computer system and a great design. A low coupling combined with the high cohesion, it supports the mission of high readability and maintainability. The coupling term generally occurs together with the cohesion very frequently.The coupling is an indication of the strength of the interconnection between all the components in a system. The highly coupled systems have interconnections, in which the program units depend upon each other, whereas in the loosely coupled systems made up of components, that are independent of each other and have no dependence on each other

enter image description here

1.Content Coupling: Content Coupling is the highest type of coupling which occurs when one of the module relies on the other module’s internal working. It means a change in the second module will lead to the changes in the dependent module.

2.Common Coupling: It is the second highest type of coupling also known as Global Coupling. It occurs when the same global data are shared by the two modules. In this, the modules will undergo changes if there are changes in the shared resource.

3.External Coupling: This type of coupling occurs when an external imposed data format and communication protocol are shared by two modules. External Coupling is generally related to the communication to external devices.

4.Control Coupling: In this type of coupling, one module controls the flow of another and passes information from one to another.

5.Message Coupling: This type of coupling can be achieved by the state decentralization. It is the loosest type of coupling, in which the component communication is performed through message passing.

6.Data Coupling: The modules are connected by the data coupling, if only data can be passed between them.

7.Stamp Coupling: In this type of coupling, the data structure is used to transfer information from on component to another.

Please log in to add an answer.