
The Method exhibits high cohesion when a method performs one and only one operation and do what their names say they do.
If they do anything else, they are less cohesive and poorly named.
Examples of highly cohesive methods:
- GetProductName()
- PrintBarcode()
- ToLower()
- CalculateAge()
- CreateUser().
3 thoughts to “Method cohesion”