what is mean by loose coupling and tight cohesion
what is mean by loose coupling and tight cohesion
loose coupling" means that objects should only have as many dependencies as is needed to do their job
Cohesion is a measure of how closely the parts of a module or class are related. Ultimately, a class should perform a single task and all of the code in the class should support that task. This is known as high or strong cohesion. When a class begins to assume to many responsibilities or has code that is unrelated to the task, the class begins to exhibit low or weak cohesion.