Concepts of OOP

OOP CONCEPTS

Object-Oriented Programming is a paradigm that provides many concepts such as inheritance, Abstraction, Encapsulation, polymorphism, etc.

What is Abstraction?
Abstraction is a process where you show only “relevant” data and “hide” unnecessary details of an object from the user.

What is Encapsulation?
 Encapsulation simply means binding object state(fields) and behavior (methods) together. If you are creating a class, you are doing encapsulation.

What is Polymorphism?
Polymorphism is an object-oriented programming feature that allows us to perform a single action in a different way.

What is Inheritance?
When one object acquires all the properties and behaviors of a parent object, it is known as inheritance. It provides code reusability. It is used to achieve runtime polymorphism.

What is Class?
Collection of objects is called class. It is a logical entity. A class can also be defined as a blueprint from which you can create an individual object. Class doesn't consume any space.

What is Object?
Any entity that has state and behavior is known as an object. For example a chair, pen, table, keyboard, bike, etc. It can be physical or logical. An Object can be defined as an instance of a class.

Comments

Popular posts from this blog

C program that contains a string XOR each character in this string with 0 ,127

Queue in Data Structure(DS)

Implementation of stack Using Array