This post answers the question “What are the 4 basics of OOP?”. As it clear from the name of the post, object-oriented programming is based on objects and data. It works with classes and objects and based on the for main principles – abstraction, inheritance, polymorphism and encapsulation.
Abstraction is the principle that allows to express only main features, hiding the details.
Inheritance shows the hierarchical relationship between classes and objects.
Polymorphism is the principle showing that certain object can be expressed in variety of different ways.
Encapsulation is the principle that allows to hide unnecessary details making a program code easier.