Object Oriented Programming - OOP

What is object oriented programming ?

Object oriented programming is a computer programming model which organizes design of software around data, objects rather than functions and logic. Objects can be defined as the data fields that has unique behavior and attributes.

The concept of object orient programming is used in several languages like java, C##, python, PHP, Ruby, JavaScript.

Languages applied for object oriented programming

Java##, JavaScript and PHP languages are called as Object Oriented Programming Languages.

In the programming we are using following two methods.

  1. Procedure Programming: Functions are considered as basic units.
  2. Object Oriented Programming: Classes are considered as basic units.
Definitions of class and objects are important in OOP concept.

What is a class ?

Class is a template definition of the methods and variables in a particular kind of object. Thus, an object is a specific instance of a class; it contains real values instead of variables. The class is one of the defining ideas of OOP.

What is an Object ?


Objects are things you think about first in designing a program and they are also the units of code that are eventually derived from the process.

The four main principles of object-oriented programming
  • Abstraction
  • Inheritance
  • Encapsulation
  • Polymorphism

1. Abstraction

1   Abstraction is defined as a process of handling complexity by hiding unnecessary information from the user.

2.Inheritance

When a class derives from another class, the child class will inherit all public and protected properties and methods from the parent class. In addition, it can have its own properties and methods.

3.Encapsulation

The notion of encapsulation(or OOP Encapsulation) refers to the bundling of data, along with the methods that operate on that data, into a single unit.

4.Polymorphism

4.  Polymorphism is one of the core concepts of object-oriented programming(OOP) and describes situations in which something occurs in several different forms. In computer science, it describes the concept that you can access objects of different types through the same interface.



Comments