Revision Notes/SOLID Principles
Field Entry - SOLID Principles
Interface Segregation Principle (ISP)
No class should be forced to implement methods it doesn't use — prefer many small, specific interfaces over one large general one.
Field Note - Real-world Analogy
“Like job contracts. A full-time employee contract covers salary, benefits, vacation, health insurance, retirement plan. A part-time contractor just needs: hourly rate and scope of work. Forcing a contractor to sign the full employee contract and acknowledge all the employee benefits is wasteful and confusing — give them only the relevant interface.”
Field Observations - Key Topics Covered
A "fat interface" is one that has too many methods. If you force classes to implement it, some classes will have methods they don't need and will either leave them empty or throw UnsupportedOperationException. This is a design smell.
4 more observations inside
Sign in to read every key point in full
Ready to go deeper?
Open the complete revision note.
Sign in to read every field observation in full, including a runnable code example and side-by-side comparisons with related patterns.
Read Full Notes