OOP Pillars
التصميم الكائنيانترفيو تقنيأساسيات كمبيوتر ساينسسهلآخر مرة اتسأل من سنة
سؤال انترفيو في إنكورتا (مصر) · المرحلة: انترفيو تقني · المجال: التصميم الكائني وأساسيات كمبيوتر ساينس · الوظيفة: مهندس برمجيات ومتدرب · الصعوبة: سهل · اتسأل مرة واحدة، آخرها يوليو 2025
What they ask
The second half of the intern technical call is a conversation, not code: "explain the four pillars of object-oriented programming, with an example for each in the language you used in the assessment."
Expect the interviewer to push on each one:
- Encapsulation: why private fields plus getters instead of public fields? When is a getter itself a smell?
- Abstraction: interface vs abstract class in Java or C#. When would you choose one over the other?
- Inheritance: overriding vs overloading, what
superdoes, why deep hierarchies hurt, and when composition is the better tool. - Polymorphism: compile-time vs run-time dispatch, and a concrete case where a base-class reference calls a subclass method.
For a fresh-grad round they also drift into basics from the same family: what a constructor is, static vs instance members, and how a Map or a hash set behaves.
What they look for
- Definitions that come with a real example, not textbook sentences.
- Knowing the trade-offs (composition over inheritance, interface segregation) rather than only the vocabulary.
- Comfort switching between "what" and "why": if you say "polymorphism lets us treat objects uniformly", be ready to show a two-line snippet that does it.