Correct option is B
Functional Cohesion is considered the best type of cohesion because all the components in a module work together to achieve a single, well-defined task or function. This ensures high modularity and promotes better maintainability and reusability of the code.
Important Key Points:
1.
Functional Cohesion occurs when every part of a module is focused on completing a single, specific function or task.
2. It ensures that modules are easier to test, debug, and maintain due to their clarity of purpose.
3. Functional cohesion leads to higher-quality software with minimal inter-module dependencies.
Knowledge Booster:
·
Logical Cohesion: Occurs when components are grouped based on performing similar types of operations (e.g., input/output operations) but lack a specific, singular purpose. It is not ideal because it can lead to confusion and decreased maintainability.
·
Coincidental Cohesion: The weakest form of cohesion, where components are grouped arbitrarily without any meaningful relationship. This makes the module hard to understand and maintain.
·
Temporal Cohesion: Occurs when components are grouped based on the time at which they are executed (e.g., initialization tasks). While better than logical or coincidental cohesion, it is still not as ideal as functional cohesion.