• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Understanding Coupling versus Cohesion

 
Ranch Hand
Posts: 63
Firefox Browser Postgres Database Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 1032
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the clarification. I'll submit a bug report to the testing software.
 
Ranch Hand
Posts: 710
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
The City calls upon her steadfast protectors. Now for a tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic