<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Cohesion (computer science) - Page 8 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=Cohesion_(computer_science)&amp;p=7">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Cohesion_%28computer_science%29&amp;p=9">3.Next</a>
</p>

<p><big> Types of cohesion </big></p>
<p>Cohesion is a qualitative measure, meaning that the source code is examined using a <a href="page.php?w=rubric_%28academic%29">rubric</a> to determine a classification. Cohesion types, from the worst to the best, are as follows:</p>

<p>;Coincidental cohesion (worst): Coincidental cohesion is when parts of a module are grouped arbitrarily. The only relationship between the parts is that they have been grouped together (e.g., a "Utilities" class). Example:<br/>
::<syntaxhighlight lang="c">/*Groups: The function definitionsParts: The terms on each function<br/>
*/Module A {  /*  Implementation of r(x) = 5x + 3  There is no particular reason to group functions in this way,  so the module is said to have Coincidental Cohesion.  */   r(x) = a(x) + b(x)   a(x) = 2x + 1  b(x) = 3x + 2}</syntaxhighlight></p><p>
<a accesskey="1" href="page.php?w=Cohesion_(computer_science)&amp;p=7">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Cohesion_%28computer_science%29&amp;p=9">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
