|
To create a program requires self sufficient resources, the way to make a piece of code modular so that it can be handled properly. This shows the relationship between different objects or in between the same objects. Different functions have to be used to keep the code different from the data provided. Object oriented programming allows creating a modular approach to make it more abstract and create the interactions between them. The features that are being provided in object oriented programming are:Encapsulation: - it deals with the grouping of data and functions together at one place or it can be said in an object that defines the interface of their interaction and the relationship between them.
Inheritance:- it deals with the relationship that exists between the parent and child classes. A child can inherit the properties of the parent and it remains helpful in creating a hierarchy in the system to keep things more modular.
Polymorphism: - is a feature that deals with different values that can be used by only one function. It doesn't have to re-create the same function again and again for different values but, it uses the same functions to call different data types.
|