C++ is an Object Oriented Programming Language which has all the features of any object-oriented language – Object, Class, Encapsulation, Inheritance, Polymorphism, Dynamic Binding, and Message Passing.
An object is an entity on which we would talk about and would create programs using it. Any entity in real life such as table, board, duster, etc., could be an object.
The second feature is the class which is a group of objects. Classes consist of all the functions and the variables in a program.
Encapsulation internally hides the operation of a function. For, e.g., when we ride a bike, we press the accelerator but doesn’t know what’s happening behind the scenes or how the engine is working. In layman terms, it wraps the data into a class, and hence only the function is allowed to access the data.
Inheritance gives a class the ability to use the features and properties of its parent class. The inherited class could be of type Public, Private, and Protected. Also, new features could be added to the child class as well. The inheritance could be single level, multi-level, multiple, and even hierarchical.
Polymorphism is the property in which one entity could have multiple forms which allow the object to behave differently in different situations. It could be static as well as dynamic.
Dynamic Binding would always be at run-time, and according to the requirement or the code, it would call that function which is needed.
At run-time, objects could communicate among each other by sending data to and fro with the help of message passing interface.