Don't Make Me Do That! – The Interface Segregation Quiz
Welcome to the land of lean interfaces, where no class is forced to attend unnecessary Zoom meetings just because it 'inherits' the invite! 🎯
👨🏫 **Definition:** The Interface Segregation Principle (ISP) says: *No client should be forced to depend on methods it does not use.* Smaller, specific interfaces = happier, focused classes.
🛠️ **Real-Life Examples:**
- Don’t ask your **electrician** to also do **plumbing** just because they're under 'Maintenance Services'.
- A **bird** shouldn't be forced to swim just because it’s part of 'AnimalWithAllSkillsInterface'.
- A **TV remote** with only 2 buttons shouldn't be forced to implement a 99-button remote interface.
🎯 In this quiz, you’ll:
- Identify bloated interfaces
- Refactor Godzilla-sized interfaces into cute, composable ones 🐣
- Avoid torturing subclasses with useless obligations
So stop making your classes sign up for talent shows they didn’t audition for. Let’s clean up those interfaces like a good spring cleaning session! 🧹✨