What is Object Oriented Programming?

 

What is Object Oriented Programming?

 OOP is a programming paradigm that represents concepts as "objects" that have data fields (attributes that describe the object) and associated procedures known as methods.

Object Oriented Programming is a programming that relies on the concept of classes and objects.


Advantages of OOP

  •  Provides a clear modular structure for programs
  • OOP makes it easy to maintain and modify existing code (new objects can be created with small differences to existing ones)
  • OOP provides a good framework for code libraries
  • Software components can be easily adapted and modified by the programmer 
Many of the most widely used programming languages (such as C++, Java, Python, etc.) are multi-paradigm and they support object-oriented programming to a greater or lesser degree, typically in combination with imperativeprocedural programming

In this article we will talk about OOP with Java language.

Concepts of OOP


What is an Object?

• A Java class is a group of Java methods and variables
• Object is an instance of a class
• Example class Person
   { // Methods
 
   // Variables } 


Encapsulation:-  

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

Abstraction:-

Abstraction is the concept of object-oriented programming that "shows" only essential attributes and "hides" unnecessary information

Inheritance:-

Inheritance is the procedure in which one class inherits the attributes and methods of another class

Polymorphism:-

 describes situations in which something occurs in several different forms



for more clarification go through the video posted below!!

Comments