It used to define the member functions of a class outside

Posted by Anonymous and classified in Computers

Written on in English with a size of 3.65 KB

Q1. Difference between Object Oriented Programming (OOP) and Procedure Oriented Programming (POP)

(12 Marks – Expanded Answer)

Programming is the process of writing instructions for a computer.
Based on program design, programming languages are mainly divided into Procedure Oriented Programming (POP) and Object Oriented Programming (OOP).


Procedure Oriented Programming (POP)

Procedure Oriented Programming is a traditional approach of programming in which functions play the main role.
The program is divided into a number of functions and these functions work on shared data.

In POP, data is not secure because most data is declared globally and can be accessed by any function.
Due to this reason, POP is suitable only for small and simple programs.

Main Points of POP

  • Focus is on procedures/functions

  • Data moves freely from one function to another

  • Difficult to maintain large programs

  • No support for data hiding

  • Uses top-down approach

Examples: C, Pascal


Object Oriented Programming (OOP)

Object Oriented Programming is a modern programming approach in which objects are the basic building blocks of a program.
An object contains both data and functions together in the form of a class.

OOP provides better security and flexibility.
It is suitable for large, complex and real-world applications such as banking systems and management software.

Main Points of OOP

  • Focus is on objects

  • Data is protected using access specifiers

  • Easy to maintain and modify programs

  • Supports reusability of code

  • Uses bottom-up approach

Examples: C++, Java, Python


Detailed Difference between OOP and POP

1. Program Focus

  • In POP, emphasis is on functions.

  • In OOP, emphasis is on objects.

2. Data Security

  • POP does not provide data security.

  • OOP provides strong data security through encapsulation.

3. Data Handling

  • In POP, data is shared globally.

  • In OOP, data is hidden inside objects.

4. Reusability

  • POP does not support code reuse.

  • OOP supports code reuse using inheritance.

5. Maintenance

  • POP programs are difficult to modify.

  • OOP programs are easy to maintain.

6. Program Size

  • POP is suitable for small programs.

  • OOP is suitable for large programs.


Conclusion

Object Oriented Programming is more powerful and efficient than Procedure Oriented Programming.
Hence, OOP is preferred in modern software development.

Related entries: