Characteristics of Good Design Component independence High cohesion Low coupling Exception identification and handling Fault prevention and fault tolerance Design for change M1 M2 M3 3
Cohesion and Coupling Cohesion is a measure of: functional strength of a module. A cohesive module performs a single task or function. Coupling A between two modules: measure of the degree of the interdependence or interaction between the two modules.
Cohesion and Coupling A module having high cohesion and low coupling: functionally independent of other modules: A functionally independent module has minimal interaction with other modules.
Cohesion Definition The degree to which all elements of a component are directed towards a single task. The degree to which all elements directed towards a task are contained in a single component. The degree to which all responsibilities of a single class are related. Internal glue with which component is constructed All elements of component are directed toward and essential for performing the same task. 6