Sei sulla pagina 1di 2

Introduction to Object Oriented Programming

Disadvantages of conventional programming


Following are the drawbacks observed in monolithic, procedural and structured programming
languages:-
• Large size programs are divided into smaller modules known as functions. These functions can call
one another thereby not imposing any security measures.
• Importance is not given to data but to the code, i.e. stress is not on data on which operations are
performed but on how to perform those operations.
• Data passes globally from one function to another.
• Most functions have access to global data.

Object Oriented Programming


The prime factor in the development of object-oriented programming approach is to remove some of
the shortcomings associated with conventional programming. Object-Oriented programming has data
as a critical component in the program development. It does not let the data flow freely around the
systems. It ties the data more firmly to the functions that operate on it and prevents it from accidental
change due to external functions. The basic objective of OOP(object oriented programming) is to treat
the data and program as individual entities.
Following are the important characteristics of OOP:-
• It pays more importance to data than to functions.
• Programs are divided into classes and their member functions.
• New data items and functions can be comfortably added whenever desired.
• Data can be kept private so that external functions cannot access it.
• Objects(references of classes) can communicate with each other through functions.

Features of OOP
-> Abstraction
Data abstraction is used in OOP so that the user can use the program without knowing the
details of source code. This provides security to the program. It is also known as data hiding. It is
implemented through classes. We access each class through its object and just call the functions of the
class through its object without knowing the detailed coding of the class.

-> Encapsulation
It refers to the welding of code and data into a single entity. OOP supports this feature using
classes. Classes contain the data(variables) and code(functions). Only the functions defined inside the
class can access the variables of the class.

-> Inheritance
It deals with the process of deriving new things from old things. In OOP, re usability is done
through classes. Suppose, new properties have to be added to a class without changing it. This can be
done by deriving a new class from the existing one. The new class will possess the features of old class
as well as the new features added.
-> Polymorphism
The basic meaning of polymorphism is too many forms of the same thing. In OOP, it is a
technique in which various forms of a single function can be defined and shared by different objects to
perform the same operation.

Advantages of OOP
• Object oriented programs can be comfortably upgraded.
• Using inheritance, redundant program codes can be eliminated and the use of previously defined
classes may be continued.
• The technology of data hiding facilitates the programmer to design and develop safe programs that
do not disturb code in the other parts of the program.
• The encapsulation feature allows the programmer to define many functions with only a few of them
exposed to the user.
• OOP enhances the thought process of a programmer leading to rapid development of new software
in short span of time.

Examples of OOP languages


C++
Small-talk
Charm++
Eiffel
Simula
Java

Usage of OOP languages


• Object Oriented DBMS
• Office automation software
• AI and expert systems
• CAD/CAM software
• Network software
• System software

Potrebbero piacerti anche