• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Coupling and Cohesion

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ranchers,
I am not able to understand clearly about coupling and cohesion from K & B.I need more examples about this.Can anyone suggest me a material for this topic.
 
Ranch Hand
Posts: 381
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vidya,
Coupling and Cohesion is a very subjective topic and could not be understand by simple examples alone.Read the book once agian while keeping in mind the following definations.
Low Coupling: Least knowledge about other class.
High Cohesion: Single resposibility of a class.
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This might be a bad idea, but allow me to go out on a fanciful limb...

High Cohesion might be expressed by the Three Musketeers' motto, "All for one, and one for all!" They are a cohesive group, united by a common objective. Furthermore, they specialize. You wouldn't call on them to wash windows, for example.

Loose (or Low) Coupling might be expressed by someone relying on the Three Musketeers for help. They don't care how the Three Musketeers do what they do -- only that it gets done. At some point, the Musketeers might change how they do things internally (maintaining their High Cohesion, of course). But because of Loose Coupling, this is of no concern to the caller who relies on them to deliver what they say they will.
 
Nothing? Or something? Like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic