Tuesday, 17 July 2018

Fundamentals of Object Oriented Programming


Fundamentals of Object Oriented Programming 
Introduction :
Object Oriented Programming is a new way of approaching the job of programming. Approaches to programming have changed dramatically since the invention of the computer in order to accommodate the increasing complexity of programs.Object Oriented Programming takes the best ideas of structured programming and combines them with powerful, new concepts that encourage you to look at the task of
programming in a new light. Object Oriented Programming allows you to easily decompose a problem into subgroups of related parts. Then you can translate these subgroups into self contained units called objects. All Object Oriented Programming language have three things in comm. These are objects, inheritance and polymorphism.
Differentiate between object oriented programming languages and structured Programming languages and state the advantages and disadvantages for using Object oriented programming languages. In structured or procedural languages a program consists of a series of Procedures / functions, and steps all tied together in a form of algorithm. Procedures / Functions are grouped together to from modules, the building block of structured Programming. In structured programming the problem is viewed as a sequence of things to be done such as reading, calculating and orienting. A number of functions are written to accomplish these tasks.

Features of structured programming language:
* Emphasis is on algorithm rather than data.
* Programs are divided into individual procedures (functions) that perform discrete tasks.
* Procedures are independent of each other as far as possible.
* Procedures have their own local data and processing logic.
* Most of the functions share global data and data move openly from function to function.
* Employs top-down approach in program design.
* Projects can be broken up into modules and programmed independently.
* Maintenance of a large software system is tedious and costly.

In object oriented programming the problem is decomposed into a number of entities called objects and then builds data and functions around these objects. OOP treats data as a critical element in the programming development and dose not allow it to flow freely around the system. It ties data more closely to the functions that operate on it and protects it from accidental modifications from outside  functions.

Features of object oriented programming language:
* Emphasis is on data rather than procedure.
* Programs are divided into what are known as objects.
* Data structures are designed such that they characterize the objects.
* Functions that operate on the data of an object are tied together in the data structure.
* Data is hidden and cannot be accessed by external functions and objects may communicate with each other through functions.
* Follows bottom-up approach in program design.

No comments: