Object-Oriented Programming (OOP)

OOP is based on “objects“. An object can perform a set of functions. The functions that the object performs defines the object’s behavior.

For example, the Batsman(object) can play shots or a Bowler(object) can Bowl.

Languages that support object-oriented programming have four important aspects:

1. Abstraction
2. Encapsulation
3. Inheritance
4. Polymorphism

Abstraction involves the process to define objects that represent abstract actions which can perform work,
report on and change their state, and interact with other objects in the system.

Encapsulation is the process of enclosing data and functions into a single element.

Inheritance is when an object or class is based on another object,
using parent objects properties to maintain the same behavior in the child object.

Polymorphism is the method of having a single interface to objects of different types.

Object-oriented programming (OOP) is a programming paradigm

Objects — > data — > fields — > attributes — > methods(code)

Some of the popular languages that support Object-Oriented Programming

Java, Python, C++, C#, Perl, Ruby , Objective-C, PHP, et al.

Facebook Comments

Leave a Reply

Your email address will not be published. Required fields are marked *