Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cohesion in Class Diagram

 
Rabin Singh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does cohesion mean in the context of a class diagram?
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here are two good references to this term:

http//www.cs.toronto.edu/~sme/CSC340F/lecture_notes/18/Object/Design/6up.pdf

In the Maximizing Cohesion slide it says:



Operation cohesion
Measure of individual operations
Does each operation focus on a single functional requirement?
Maximise because:
If each operation deals with a single functional requirement, requirements change is easier to support

Class cohesion
Measure of individual classes
Does each class focus on a single domain concept?
Maximise because:
Classes become overly complex otherwise


http://www.agilemodeling.com/artifacts/classDiagram.htm

The Seminar class of Figure 2 is refactored into the classes depicted in Figure 5. Refactoring such as this is called class normalization (Ambler 2004), a process in which you refactor the behavior of classes to increase their cohesion and/or to reduce the coupling between classes.


Regards,
Dan
 
Rabin Singh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You Very Much, Dan.

Regards,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic