File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Understanding Coupling versus Cohesion

 
Richard Broersma
Ranch Hand
Posts: 63
Firefox Browser Postgres Database Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I purchased a SCJP test question practice tool.

One question is:

"Which of the following concepts is a measure of inter-class dependencies? "

My intuition is that coupling is related the concept of inter-class dependencies. However, according to the testing tool, Cohesion is a measure of inter-class dependencies.

I figure that my understand of cohesion must be incomplete because I can't seem to accept this as the correct answer.

Can anyone explain why inter-class dependencies are associated with cohesion and not coupling?
 
Ruben Soto
Ranch Hand
Posts: 1032
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Richard,

You are correct. Coupling measures inter-class dependency. Cohesion measures how focused a class is. In other words, a class should do only a few very related things, as opposed to combining functionality that should be split in different classes to promote modularity and code reuse.
 
Richard Broersma
Ranch Hand
Posts: 63
Firefox Browser Postgres Database Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the clarification. I'll submit a bug report to the testing software.
 
W. Joe Smith
Ranch Hand
Posts: 710
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Richard Broersma wrote:I purchased a SCJP test question practice tool.


Which one? I ask because you may be able to search this forum (or others, the internet is huge...) to find a list of exam errata.
 
Richard Broersma
Ranch Hand
Posts: 63
Firefox Browser Postgres Database Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the certification test tool that I am using. I would love to find errata for this tool.

http://www.ucertify.com/exams/SUN/CX310-066.html
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic