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.
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.
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
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.