Back to the 2022 paper

Module 3: Software Design & Metrics

20227m

Define cohesion and coupling. Explain various types of each of them.

Worked SolutionAI Assisted

Solution

Cohesion & Coupling (Detailed)

Cohesion - Within module:

Type Description Example
Functional Single purpose calculateSalary()
Sequential Output→Input Read→Process→Write
Communicational Same data Print/Update Student record
Procedural Sequential steps init() calls A then B
Temporal Same time startup()
Logical Similar functions inputAll()
Coincidental Random Utility misc

Order: Functional (best, 10/10) → Coincidental (worst, 1/10).

Coupling - Between modules:

Type Description
Data Parameters x,y
Stamp Structure student
Control Flag if(flag)
External Hardcoded protocol
Common Global int g;
Content goto into other module

Order: Data (best) → Content (worst).

Goal: Functional cohesion + Data coupling.

Similar questions

Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.