Interview practice question
Interface with 20 methods
Backend Engineering · OOP and Design Patterns · Intermediate
A UserStore interface has 20 methods, and most implementations throw "not supported" for half of them. How do you fix it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Violates interface segregation.
- Split into role interfaces.
- Clients depend on what they use.
- Implementations implement relevant roles.
- Smaller mocks.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.