Skip to content

Commit 5b07125

Browse files
stephen-heroonewhl
authored andcommitted
Update task.md
language checked
1 parent 3cc72b9 commit 5b07125

File tree

1 file changed

+6
-6
lines changed
  • MovingCode/CohesionAndCoupling/Theory

1 file changed

+6
-6
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Task: 1/2: Cohesion and coupling
22

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

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

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

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

0 commit comments

Comments
 (0)