Software Design Metrics (3) Cohesion metric Construct flow graph for module Each vertex is an executable statement For each node, record variables referenced in statement Determine how many independent paths of the module go throug the different statements If a module has high cohesion most of variables will be used by statements in most paths Highest cohesion is when all the independent paths use all the variables in the moduleSoftware Design Metrics (3) Cohesion metric Construct flow graph for module. - Each vertex is an executable statement. - For each node, record variables referenced in statement. Determine how many independent paths of the module go through the different statements. If a module has high cohesion, most of variables will be used by statements in most paths. - - Highest cohesion is when all the independent paths use all the variables in the module. �