177k views
3 votes
With the Interface Segregation Principle, do we want to favor large, general interfaces?

a. Yes
b. No

1 Answer

1 vote

Final answer:

With the Interface Segregation Principle, we do not want to favor large, general interfaces; we should instead create smaller and more precise interfaces tailored to client needs.

Step-by-step explanation:

The Interface Segregation Principle (ISP) is one of the five SOLID principles of object-oriented design, which advocates for leaner, more specific interfaces rather than large, general ones. According to ISP, a client should not be forced to depend on interfaces it does not use. Instead, preferably design many smaller and more precise interfaces that are client-specific. This approach helps in maintaining a codebase that is easier to understand, maintain, and refactor. So, in response to the question, with the Interface Segregation Principle, we do not want to favor large, general interfaces.

User Imcc
by
7.2k points