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

Cohesive classes

 
Ranch Hand
Posts: 643
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is meant by cohesive classes ?
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is a wiki link

Cohesion

[EDIT]

Adjusted the link.
 
chetan deol
Ranch Hand
Posts: 643
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Link is not useful.
 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the hyperlink appears to be broken - the trailing ')' has been dropped. Copy and paste the full text of the link and it will be ok.

 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For the SCJP exam, you do not need to know what the term "cohesion" means or what "cohesive classes" are, so I will move this topic to a more appropriate forum.
 
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesper Young wrote:For the SCJP exam, you do not need to know what the term "cohesion" means or what "cohesive classes" are, so I will move this topic to a more appropriate forum.



??? It's in the K&B book and has a big bold headline (p. 151), I quote, Coupling and Cohesion (Exam Objective 5.1), quote end.

cheers
Bob
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bob Wheeler wrote:

Jesper Young wrote:For the SCJP exam, you do not need to know what the term "cohesion" means or what "cohesive classes" are, so I will move this topic to a more appropriate forum.



??? It's in the K&B book and has a big bold headline (p. 151), I quote, Coupling and Cohesion (Exam Objective 5.1), quote end.

cheers
Bob



Yep, you do need to know a little Coupling and Cohesion. Perhaps this post will have to be moved again
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, moderators are not perfect either, I'll move it back again.
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cohesion is explained fairly in K & B book, if you read that I think one should be able to understand clearly.

My understanding is that, cohesion is to make sure that a class takes care only one definitive purpose. The whole responsibility is to represent and perform single functionality. For e.g if you want to write a class which would help in generating reports, it should be doing only report related stuff and nothing more.

Hope that helps.

-Parash
Preparing for SCJP 1.6
 
Climb the rope! CLIMB THE ROPE! You too tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic