Interview Q&A / Object-Oriented Programming
Object-Oriented Programming interview questions
The four pillars, interfaces, abstract classes and design basics.
Prefer rapid revision? Practise Object-Oriented Programming short interview answers →
- How do you spot a Single Responsibility violation in real code?
Look for a class whose description needs the word and, imports from unrelated areas, unrelated groups of fields, or edits from different people for different reasons.
IntermediateQuick answer1 min read - How is the Interface Segregation Principle different from the Single Responsibility Principle?
SRP is about a class having one reason to change. ISP is about the interface a client sees: it should be small and fit that client's needs. One is about implementation, the other about the contract.
IntermediateQuick answer1 min read