Ad Code

How can we increase Cohesion in Software Design?

How can we increase Cohesion in Software Design?


Software design criteria involves modular design. Modular design means low coupling, high  cohesion.Cohesion is a measure of how closely related all the responsibilities, data, and methods of a class are to each other.  Cohesion can be achieved by focusing on each cohesion separatly (funcctional cohesion, communication cohesion, procedural cohesion,data cohesion,temporal cohesion).  At design level, cohesion can be increased by reducing dependencies on other moddules. A simple way to make module cohesive, check that all the contents of the class should be directly related to and described by the name of the class. If the class has responsibilities that don't relate to its name, those responsibilities probably belong to a different class.If there ia subset of methods and fields that could easily be grouped separately under another class name, then they should be extract these methods and fields to a new class. 
Reactions

Post a Comment

0 Comments