All Exams Test series for 1 year @ ₹349 only
Question

Arrange the following types of Cohesion from best to worst type.

(A) Logical Cohesion

(B) Sequential Cohesion

(C) Communication Cohesion

(D) Temporal Cohesion

(E) Procedural Cohesion

Choose the correct answer from the options given below:

The correct answer is

B → C → E → D → A

Understanding Software Module Cohesion Ranking

Cohesion in software engineering is a measure of how strongly related or focused the elements within a module are. A high level of cohesion is desirable because it indicates that a module performs a single, well-defined task. This makes the module easier to understand, test, maintain, and reuse. Conversely, low cohesion means a module performs unrelated or loosely related tasks, making it complex and harder to manage.

The different types of cohesion are ranked from best (most desirable) to worst (least desirable). Let's look at the types provided in the question and their typical ranking:

  • Sequential Cohesion (B): Elements are grouped because the output from one element serves as the input for another element. The tasks are related through data flow. This is a very good type of cohesion.
  • Communication Cohesion (C): Elements are grouped because they operate on the same input data or produce the same output data. The tasks are related by their use of common data. This is also a good type of cohesion, slightly less strong than sequential.
  • Procedural Cohesion (E): Elements are grouped because they are executed in a specific order to achieve a specific goal, often involving control flow. The tasks are weakly related sequentially or temporally.
  • Temporal Cohesion (D): Elements are grouped because they are all processed at the same time or at a similar point in time. For example, initialization or shutdown tasks. The tasks are otherwise unrelated.
  • Logical Cohesion (A): Elements are grouped into a module because they fall into the same logical category, even if they are functionally different and only one element is executed at a time based on input parameters. For example, a module for "all output routines" regardless of what is being output. This is generally considered poor cohesion.

The standard ranking of these types from best to worst is:

  1. Sequential Cohesion (B)
  2. Communication Cohesion (C)
  3. Procedural Cohesion (E)
  4. Temporal Cohesion (D)
  5. Logical Cohesion (A)

Therefore, arranging the given types from best to worst results in the order B → C → E → D → A.

This order aligns with the principle that tasks within a module should be as functionally related as possible (Sequential and Communication) rather than being grouped just by time (Temporal) or arbitrary category (Logical).

Here is a summary of the cohesion types mentioned and their position in the hierarchy:

Rank (Best to Worst) Cohesion Type Description
1 Sequential Cohesion (B) Output of one element is input to another.
2 Communication Cohesion (C) Elements operate on the same data.
3 Procedural Cohesion (E) Elements grouped by execution order.
4 Temporal Cohesion (D) Elements grouped by time of execution.
5 Logical Cohesion (A) Elements grouped by logical category.

Based on this ranking, the correct arrangement from best to worst cohesion is B → C → E → D → A.

Revision Table: Software Module Cohesion Types

Cohesion Type Ranking Characteristics
Sequential Best (among those listed) Tasks linked by data flow (output → input).
Communication Second Best Tasks share common input/output data.
Procedural Middle Tasks grouped by execution sequence.
Temporal Fourth Best Tasks grouped by execution time.
Logical Worst (among those listed) Tasks grouped by category, selected by flag/parameter.

Additional Information: Cohesion and Coupling in Software Design

Cohesion is often discussed alongside Coupling, another important concept in software design. While cohesion measures the strength of relationships *within* a module, coupling measures the strength of relationships *between* modules.

  • High Cohesion: Good. A module does one thing well.
  • Low Cohesion: Bad. A module does many unrelated things.
  • Low Coupling: Good. Modules are independent and changes in one have minimal impact on others.
  • High Coupling: Bad. Modules are highly dependent, making changes difficult and error-prone.

Good software design aims for high cohesion and low coupling. Achieving this balance leads to systems that are easier to develop, understand, test, and maintain.

Other types of cohesion not listed in the question include:

  • Functional Cohesion: (Considered the best type overall) Elements contribute to a single, well-defined task or function.
  • Coincidental Cohesion: (Considered the worst type overall) Elements are grouped arbitrarily with no meaningful relationship between them.

Understanding these types helps in designing modular, maintainable, and robust software systems.

Was this answer helpful?

Important Questions from Software Development Models

  1. COCOMO stands for _______

  2. Among the following, which option describes a functional requirement?

  3. Which of the following is/are the phases of system development life cycle?

  4. The model in which the requirements are implemented by its category is

  5. RAD software process model stands for

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App