Software Engineering (2160701)

BE | Semester-6   Winter-2019 | 14-12-2019

Q3) (A)

Compare coupling and cohesion

Cohesion

Coupling

Cohesion is the indication of the relationship within module.

Coupling is the indication of the relationships between modules

Cohesion shows the module’s relative functional strength.

Coupling shows the relative independence among the modules.

Cohesion is Intra – Module Concept.

Coupling is Inter -Module Concept.

While designing you should strive for high cohesion i.e. a cohesive component/ module focus on a single task

While designing you should strive for low coupling i.e. dependency between modules should be less.

Cohesion is the kind of natural extension of data hiding for example, class having all members visible with a package having default visibility.

Making private fields, private methods and non-public classes provides loose coupling.