Have you noticed how the same cliche questions always get asked at job interviews — over and over again? Whether it is where you will be in five years or what you consider to be your biggest weakness, while the questions may be trivial, they do give interviewers clues to better knowing you.
The same thing could be said about programming questions, such as "What are the main principles of Object-Oriented Programming?" It is a great opportunity to determine:
- If the candidate prepared for the interview
- If the candidate is past the tutorial phase
- If the candidate's understanding is deep or shallow
It comes down to understanding four principles of object-oriented programming: encapsulation, abstraction, inheritance, and polymorphism.
How should these principles be incorporated into an answer when asked? Here's an answer.