Understanding OOP concepts
The OOP model is based on several concepts. These concepts must be familiar to any developer who is planning to design and program applications relying on objects. Therefore, let's start by enumerating them as follows:
- Object
- Class
- Abstraction
- Encapsulation
- Inheritance
- Polymorphism
- Association
- Aggregation
- Composition
Commonly, when these concepts are wrapped in questions, they are prefixed by What is ...? For example, What is an object?, or What is polymorphism?
Important note
The correct answers to these questions are a combination of technical knowledge and real-world analogies or examples. Avoid cold answers with super-technical details and no examples (for example, don't talk about the internal representation of an object). Pay attention to what you're saying because the interviewer may extract questions directly from your answers. If your answer has mentioned a notion in passing, then...