• Adharit

Why do we need Object oriented programming?

Object oriented programming offers a new way to cope with complexity. Instead of viewing a program as a series of steps to be carried out, it views it as a group of objects that have certain properties and can take certain actions.

Object oriented programming was developed because limitations were discovered in earlier approaches to programming. To appreciate what OOP does, we need to understand what these limitations are and how they arose from traditional programming languages.

Procedural languages

C, Pascal, FORTRAN and similar languages are procedural languages. That is, each statement in the language tells the computer to do something i.e. get some input, add these numbers, divide by six etc. A program in a procedural language is a list of instructions

There are also lots of other problems with structured programming such as-

  • Division into functions

  • Unrestricted access

  • Real world modelling

Idea behind OOP

The fundamental idea behind object oriented approach is to combine into a single unit both data and the functions that operate on that data. Such a unit is called and Object.

Features of OOP

When you approach a programming problem in object orientes language, you no longer ask how the problem will be divided into functions, but how it will be divided into objects such as-

  1. Physical objects

  2. Elements of computer user environment

  3. Data storage constructs

  4. human entities

  5. Collections of data

  6. User defined data types

  7. Components in computer games

So there are other benefits of object oriented programming languages and a lot of other easier OOPs to follow.

3 views0 comments