SOFTWARE DESIGN
DESIGN PATTERNS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
In CoR pattern you can introduce new handlers into the app without breaking the existing client code. What SOLID principle does it follow?
|
Single Responsibility
|
|
Open/Closed
|
|
Dependency Inversion
|
|
Liskov Substitution
|
Explanation:
Detailed explanation-1: -Not following the Open-Closed Principle breaks the Single Responsibility Principle since the class might have to do multiple tasks. If the changes are implemented on the same class, Maintenance of the class becomes difficult since the code of the class increases by thousands of unorganized lines.
Detailed explanation-2: -He explained the Open/Closed Principle as: “Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification.”
There is 1 question to complete.