Skip to content

Commit

Permalink
Update task.md
Browse files Browse the repository at this point in the history
language checked
  • Loading branch information
stephen-hero authored Jan 22, 2024
1 parent 44f28c5 commit 2644bc1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions MovingCode/CohesionAndCoupling/Theory/task.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Task: 1/2: Cohesion and coupling

_**Cohesion**_ and _**coupling**_ are fundamental concepts in software design, which determine how well the components of a
system are organized and how they interact with each other. Move refactorings can play a crucial role in improving
_**Cohesion**_ and _**coupling**_ are fundamental concepts in software design that determine how well system components
are organized and interact with each other. Move refactorings can play a crucial role in improving
cohesion and reducing coupling within the codebase.

**_Cohesion_** refers to how well the parts of a module (such as a class or a function) are related and focused on doing
**_Cohesion_** refers to how closely the elements of a module (such as a class or function) are related and focused on doing
one
specific job.
**High cohesion** means that the elements inside the module work closely together and share a common purpose.
On the other hand, **low cohesion** means that the elements inside the module perform various
**High cohesion** means that the elements within the module work closely together and share a common purpose.
Conversely, **low cohesion** means that the elements within the module perform various
unrelated tasks, making the module less organized and harder to understand.

To improve cohesion, ensure that each class and method has a clear and singular responsibility.
Expand All @@ -19,6 +19,6 @@ impacting others.
On the other hand, **high coupling** means that the parts are closely interconnected, so changes in one part may affect
many others.

To improve coupling, use Move refactoring to reorganize code elements, such as methods and fields, to reduce direct
To lessen coupling, use Move refactoring to reorganize code elements, such as methods and fields, to reduce direct
dependencies between different modules or classes.
Reducing coupling while increasing cohesion leads to a more maintainable and flexible codebase.

0 comments on commit 2644bc1

Please sign in to comment.