Wednesday 15 October 2014

Concept OOP

Hey Guys,
You are familiar with Structured Programming Language.....
Now, We have new concept that is Object Oriented Programing Language i.e., OOP.

OOP is a Programming Paradigm that represent concept of 'Objects' that have 'Data Fields' (attributes that describe the object) and associated procedures known as Methods.

Now you have a Question i.e. , What is Paradigm?
The term paradigm describes a set of techniques, methods, theories and standards that together represent a way of thinking for problem solving. According to [Wegner, 1988], paradigms are “patterns of thought for problem solving”.

Language paradigms were associated with classes of languages. First the paradigms are defined. Thereafter, programming languages according to the different paradigms are classified. The language paradigms are divided into two parts, imperative and declarative paradigms as shown in the Figure.

  • Imperative languages: can be further classified into procedural and object oriented approach.
  • Declarative languages: can be classified into functional languages and logical languages.

Imperative paradigm: The meaning of imperative is “expressing a command or order”, so the programming languages in this category specify the step-by-step explanation of command.

Procedural paradigm: Procedural languages are statement oriented with the variables holding values. In this language the execution of a program is modeled as a series of states of variable locations.

Object Oriented paradigm: The Object Oriented paradigm is centered on the concept of the object. Everything is focused on objects.

Declarative paradigm: In this paradigm programs declare or specify what is to be computed without specifying how it is to be achieved. Declarative programming is also known as Value-oriented programming.

Functional paradigm: In this paradigm, a program consists of a collection of functions. A function just computes and returns a value.

Logic paradigm: In this paradigm programs only explain what is to be computed not how to compute it. Here program is represented by a set of relationships, between objects or property of objects known as predicate which are held to be true, and a set of logic/clauses (i.e. if A is true, then B is true). Basically logic paradigm integrates data and control structures.


Object Oriented Programming

Object Oriented Programming is a real world programming.

The world and its applications are not organized as functions and values separate from one another. The problem solvers do not think about the world in this manner. They always deal with their problems by concentrating on the objects, their characteristics and behavior.

The world is Object Oriented, and Object Oriented programming expresses programs in the ways that model how people perceive the world. there are many real world objects around us which we often used to performing different functions. such as, our compass box, fans etc. through this real world example we can understand that problem solving using OO approach  is very close to our real life problem solving techniques.

The major benefit of using OO approach is that the program is organized around the data being operated upon rather than the operations performed. The basic idea behind OOP is to combine both, data and its functions that operate on the data into a single unit called object.