Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update task.md #13

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
@@ -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.