1/59
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
How is a "reason to change" defined in the context of SRP?
In SRP, a **"reason to change" is defined as a responsibility**.
What undesirable state can an application reach if SRP is not followed?
An application can become an **unmanageable "tangled mess" or "plate of spaghetti"**, making it difficult to maintain and extend.
When should developers exercise caution or judgment when applying SRP?
It is **not wise to strictly apply SRP if there is no symptom of a problem**, as over-application can lead to needless complexity or a "class explosion".
How does the Single Responsibility Principle relate to code cohesion?
Applying SRP leads to **high cohesion**, where elements within a module are functionally related and belong together, making the module easier to reason about.