Page 19 - CA_Blue( J )_Class9
P. 19
Using this technique of writing source code makes it easy to create different objects from a common structure.
This common structure is usually called a blueprint or class and the objects that are created are called instances.
Java, C++, C#, Python are some commonly known Object-Oriented Programming languages.
Principles of Object-Oriented Programming
OOP depends on the following principles: Definition
1. Data Abstraction A programming model that depends on
2. Inheritance the theory of classes and objects, and gives
3. Polymorphism importance on data rather than functions
4. Encapsulation is known as Object-Oriented Programming
(OOP).
They are also called the four pillars of Object-Oriented
Programming.
Advantages of Object-Oriented Programming
Following are the advantages of Object-Oriented Programming:
1. Each and every instance has properties that are exclusively for its own use and cannot be used by other
instances. For example, if you have a Car blueprint, you can create many instances of Car with different model
names such as Maruti Suzuki, Ford Figo and Ambassador, etc. Thus, a real-world picture can be explained.
2. It uses the concept of re-usability where code is written once and can be used multiple times using different
objects.
3. Maintaining and modifying existing code is much easier due to inheritance and polymorphism, which allow for
the reuse of existing code with minimal changes.
4. Abstraction and Data hiding maintain the security of data.
5. The concept of Inheritance helps avoid data redundancy by allowing code reuse.
Disadvantages of Object-Oriented Programming
Following are the disadvantages of Object-Oriented Programming:
1. Object-Oriented program needs more lines of code than Procedure-oriented program.
2. It typically requires more memory to run, and thus, its execution may be slower compared to Procedure-Oriented
Programming.
3. It requires intensive testing.
4. Proper planning is necessary for designing effective Object-Oriented programs due to their complexity and
structure.
1.2.3 Difference between POP and OOP
We have learnt about Procedure-Oriented Programming and Object-Oriented Programming. Now let us take a look
at the difference between them.
Procedure-Oriented Programming Object-Oriented Programming
Programs are divided into small parts known as Programs are divided into small parts known as
functions or methods. objects.
It uses the concept of Top-Down approach. It uses the concept of Bottom-Up approach.
It deals with Algorithm/Procedures It deals with data.
It is less secure It is more secure
Examples: C, Fortran Examples: C++, Java
Principles of Object-Oriented Programming 17

