Page 1 of 1

About Question enthuware.ocpjp.v7.2.1231 :

Posted: Fri Nov 08, 2013 9:06 am
by muttley
Could you please explain a fill better why the "Level of cohesion of A and B cannot be determined." anwser is right?
You explained this way:
"Cohesion means how focused is a class with respect to the functionality that it provides. If it does multiple unrelated things, it is low on cohesion. Low cohesion is a bad thing.
In this case, since there is no information about the functionality, we can't really determine the level of cohesion."
If a coesion means "how focused is a class with respect to the funcionality that it provides then the cohesion of A and B is high because B is-a A.
Thanks

Re: About Question enthuware.ocpjp.v7.2.1231 :

Posted: Fri Nov 08, 2013 10:32 am
by admin
Yes, B is-a A, but what do B and A do? What functionalilty do they implement? This is not given in the question but it is required to determine the cohesion.

For example, let's say you have a class Student. Now, if this class captures Student attributes and also contains functionality for some unrelated stuff such as maintain account balances, then it is low on cohesion.

HTH,
Paul.