intermediateSOLID Principles

What is the Interface Segregation Principle, and why do 'fat interfaces' violate it?

Clients shouldn't be forced to depend on methods they don't use — a class implementing an interface should need every method on it, not just some. A 'fat interface' like Worker with work() and eat() methods forces a Robot implementation to provide a meaningless eat() method; splitting it into separate Workable and Eatable interfaces lets each class implement only what actually applies to it.

This is a Pro question

Sign in, then upgrade to Pro or Power to unlock this question and the full Interview Prep bank.

What is the Interface Segregation Principle, and why do 'fat interfaces' violate it?

Next Step

Continue to What is the Builder pattern? When should you use it over a constructor?← Back to all Design Patterns & LLD questions