Select Your Favourite
Category And Start Learning.

Overview of Programming

with OOP

 

Object Oriented Programming (OOP) is a programming paradigm that uses classes and objects to organise code. Every developer has used at some point in their career. It is taught as the standard way to code in most computer courses across India.

 

It simplifies software development and maintenance by providing some concepts:

  • Object
  • Class
  • Inheritance
  • Polymorphism
  • Abstraction
  • Encapsulation

 

Object-oriented programming languages include Java, C++, Python, and JavaScript, among others.

Image

Let's dive into each of these in a little more details.

 

 

1. OBJECT

An object is any entity that has a state and behavior. For example, a chair, pen, table, keyboard, bicycle, etc. It could be physical or logical in nature. An instance of a class can be defined as an Object. An object contains an address and occupies some memory space.

The only thing important is the type of message that is accepted and the type of response that the objects provide.

 

 

2. CLASS

The term "class" refers to a collection of objects. It's a logical entity. A class can alternatively be defined as a blueprint from which an individual object can be created. Class doesn't use much space.

 

 

 

3. INHERITANCE

Inheritance occurs when one object inherits all of the characteristics and behaviors of a parent object. It allows code reusability. It's used to achieve polymorphism at runtime.

 

 

4. POLYMORPHISM

Polymorphism occurs when a single task is performed in multiple ways. For example, to convince a consumer in a different way, to draw something, like a triangle, rectangle, etc.

To create polymorphism in Java, we use method overloading and method overriding.

 

 

5. ABSTRACTION

Abstraction is the process of hiding internal features while displaying functionality. For example, we don't know the internal processes of a phone call.

To achieve abstraction in Java, we use abstract class and interface.

 

 

 

6. ENCAPSULATION

Encapsulation is the process of binding (or wrapping) code and data into a single unit. For example, a capsule is wrapped in various medicines.

A java class is an example of encapsulation.



That's all for now. Until next time.

Author
AuthorPriyanka Dutta
Priyanka graduated with B.Tech in Electronics & Communication Engineering. She like organising data so much that building dashboards and models feel rewarding to her. She also likes to write about her work.

Follow us on your favourite social platform

Share with friends