all these is theory i found about Cohesion class in Java .
High-cohesion means well-structured classes .
Cohesive means that a certain class performs a set of closely related actions.
A lack of cohesion, on the other hand, means that a class is performing several unrelated tasks
Though lack of cohesion may never have an impact on the overall functionality of a particular class
Can i get an example for this type of behaviour of a class??
Lets say that you have a hotel management program and that it has a class Manager that handles the checking in and out of customers and also the registering of customer.
That class has low cohesion. It would be much better to have 2 classes. One that handles checking in and out and the other one of registering customers.
Because then the have a high cohesion.