CS FundamentalsVery hardCapgemini · HCL

A module contains functions to print to screen, write to a file and send over a network; a flag argument decides which one runs. Which cohesion level is this?

  1. A. Functional cohesion
  2. B. Sequential cohesion
  3. C. Temporal cohesion
  4. D. Logical cohesion

Correct answer: D. Logical cohesion

Elements are grouped because they are of the same logical category (output), with a control flag selecting the task, which is logical cohesion.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic