FDM Group Interview Question

What are the four pillars of oop object oriented programming

Interview Answer

Anonymous

Mar 7, 2019

1) Inheritance: Is a powerful feature in OOP which will help makes the code look cleaner and well organized, by creating a hierarchy and enables these classes to inherit some features and attributes from the class up the hierarchy. 2) Polymorphism: Is OOP concept which will create different forms from the same class, so for example class "Animal" can have different objects with different names and each name do different methods. 3) Encapsulating: one of the four fundamentals of OOP, it's wrapping the methods and variable in one single unit. it's also known as data hiding, which you will set the variable as private, and provide public getters and setters to access that variable. 4) Abstraction: you hide the details so that the user won't know the implementation part.

1