OOPs Overview

What is Object Oriented Programming?

Object oriented programming came to remove the flaws of traditional programming. Procedure oriented programming is also known as traditional programming, since it’s quite difficult to work with real world problems.

What is Object Oriented Programming Paradigm?

Object oriented introduced to solve the issues with traditional programming. OOP protects data from accidental modification by considering data as a critical element. Objects are what OOP makes it different. Programs are divided into objects.

OOPs benefits and applications

Benefits

Here are the benefits of OOPs,

  • Eliminating redundant code is quite easy.
  • Objects allow easier division of project tasks.
  • Saves development time
  • Communication between objects makes the task simpler.
  • Data can’t be accessed directly i.e. the concept of data hiding makes secure programs.

Applications

The following are the applications of OOPs in the real world,

  • Office automation system
  • Simulation
  • Modeling
  • Decision support systems
  • CAD systems

OOPs concepts

Polymorphism

It is a Greek term that means Poly + morphism i.e. more than one form. It can also be said as different behaviors in different instances. Polymorphism can be seen and used in the following,

  • Operator Overloading:
    When an operator performs different types of tasks it is known as operator overloading. It performs different behaviors in different instances.
  • Function Overloading:
    When a function performs different types of tasks.

Classes

Class is a blueprint, which contains data member and member functions. A class can have any number of objects and therefore a class can be considered as a collection of objects that belong to the same class.

Objects

Object is a runtime entity. They have an associated memory and takes space in memory. For example, if Clothing is a class, then Tshirt can be an object defined as, clothing tshirt;

Encapsulation

When you enclose data and functions into a single unit, it is known as Encapsulation. The unit in which the data and functions are enclosed is known as a class.

Abstraction

When key features are represented without including the background details is known as Abstraction. Classes use it and the attributes are known as data members. Functions in a class are known as member functions. Classes are also known as Abstract Data Types (ADT), since it use the concept of data abstraction with data members and member functions.

Inheritance

Inheritance brings reusability and supports hierarchical classification.  For example, Tshirt class is a part of the Clothing. Inheritance has a base class and derived class. Common characteristics are shared by derived class with the base class (i.e. the class from which it is derived).


Recommended Posts

C++ First Program
Studyopedia Editorial Staff
Studyopedia Editorial Staff
[email protected]

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue reading