Explain the basic features of OOPs.
The following are the four basic features of OOP:
· Abstraction - Refers to the process of exposing only the relevant and essential data to the users without showing unnecessary information.
· Polymorphism - Allows you to use an entity in multiple forms.
· Encapsulation - Prevents the data from unwanted access by binding of code and data in a single unit called object.
· Inheritance - Promotes the reusability of code and eliminates the use of redundant code. It is the property through which a child class obtains all the features defined in its parent class. When a class inherits the common properties of another class, the class inheriting the properties is called a derived class and the class that allows inheritance of its common properties is called a base class.
No comments:
Post a Comment