Vous êtes sur la page 1sur 2

NICS Educational And Welfare Society (Regd.

) Sirhind

Topics covered
POP
OOP
Basic Concepts of Object Oriented Programming
o Objects
o Classes
o Data Abstraction and Encapsulation
o Inheritance
o Polymorphism

Procedure Oriented Programming Paradigm (POP)

Conventional programming, using high-level languages such as COBOL, FORTRAN and C


is commonly known as Procedure-Oriented programming language (POP). In the
procedure-oriented approach, the problem is viewed as a sequence of things to be done such
as reading, calculating and printing
POP basically consists of writing a list of instructions for the computer to follow, and
organizing these instructions into groups known as functions. While we concentrate on the
development of functions, very little attention is given to the data that is being used by
various functions.

Object Oriented Programming Paradigm (OOP)

Object oriented programming treat data as a critical element in the program development and
does not allow it to flow freely around the system. It ties the data more closely to the function
that operates on it, protects it from accidental modification from outside function. OOP
allows decomposition of problem into a number of entities called objects and builds data and
function around these objects. The data of an object can be accessed only by the functions
associated with that object.
NICS Educational And Welfare Society (Regd.) Sirhind

Basic Concepts of Object Oriented Programming

It is necessary to understand some of the concepts used in Object Oriented Programming.


These include.

 Objects
 Classes
 Data Abstraction and Encapsulation
 Inheritance
 Polymorphism

Objects:

Objects are the basic run time entities in an object-oriented system. They may represent a
person, a place, a bank account, a table of data or any item that the program has to handle.
They may also represent user define data such as time and lists.
Each object contains data and code to manipulate that data. Object can interact
without having to know details of each other’s data or code.

Classes:

The entire set of data and code of an object can be made a user define data type with the help
of a class. In fact the objects are variable of the type class. Once the class has defined, we can
create any number of objects belonging to that class. Each object is associated with the data
of type class with which they are created. A class is thus a collection of objects of similar
type.

Data Abstraction and Encapsulation:

The wrapping up of data and function into a single unit (Called Class) is known as
Encapsulation. Data encapsulation is most striking feature of Class. The data is not accessible
to outside world, and only functions, which are wrapped in the class, can access it. These
functions provide an interface between the object data and the program. This insulation of the
data from direct access by the program is called Data hiding or Information hiding.

Inheritance

Inheritance is the process by which objects of one class acquire the properties of object of
another class. It supports the concept of Hierarchical Classification.
In OOP, the concept of inheritance provides the idea of reusability. This mans that we
can add additional features to an existing class without modifying it. This is possible by
deriving a new class from the existing one. The new class has the combined features of both
the classes.

Polymorphism:

Polymorphism is another important OOP concept. Polymorphism, a Greek term, and means
the ability to take more than one form. An operation may exhibit different behavior in
different instances.

Vous aimerez peut-être aussi