GRASP (object-oriented design): Difference between revisions

Content deleted Content added
No edit summary
High Cohesion: updating high cohesion grasp pattern
Line 29:
 
==High Cohesion==
<div id="highcohesion"/>
'''High Cohesion''' is also an evaluative pattern, and helps manage complexity by assigning highly related (cohesive) responsibilities to a class. Like ''Low Coupling'', ''High Cohesion'' also favors maintainabilty and reuse.
'''High Cohesion''' is an evaluative pattern that attempts to keep objects appropriatley focused, manageable and understandable. High cohesion is genereally used in support of Low Coupling. High cohesion means that the responsibilities of a given element are strongly related and highly focused. Breaking programs into classes and subsystems is an example of activies that increase the cohesive properties of a system. Alternativley, low cohesion is a situation in which a given element as too many unrelated responsibilites. Elements with low cohesion offer suffer from being hard to comprehend, hard to reuse, hard to maintain and adverse to change.<ref name="larman314">{{citebook|last=Larman|first=Craig|authorlink=Craig Larman|title=Applying UML and Patterns - An Introduction to Object-Oriented Analysis and Design and Iterative Development|origdate=2004|edition=3rd|publisher=Prentice Hall PTR|___location Upper Saddle River, New Jersey|year=2005|isbn=0-13-148906-2|pages=314-315}}</ref>
 
==Polymorphism==