Difference between OOP and POP
Last Updated :
22 Feb, 2023
Object-Oriented Programming (OOP)
- OOP treats data as a critical element in the program development and does not allow it to flow freely around the system.
- In OOP, the major emphasis is on data rather than procedure (function).
- It ties data more closely to the function that operate on it, and protects it from accidental modification from outside function.
- OOP allows decomposition of a problem into a number of entities called objects and then builds data and function around these objects.
- The data of an object can be accessed only by the function associated with that object. However, function of one object can access the function of other objects.
- C++, Java, Dot Net, Python etc are the example of Object oriented programming (OOP) language.
Some Characteristics of Object Oriented Programming:-
- Emphasis is on data rather than procedure (function).
- Programs are divided into objects.
- Functions that operate on the data of an object are ties together in the data structure.
- Data is hidden and cannot be accessed by external function.
- Objects may communicate with each other through function.
- New data and functions can be easily added whenever necessary.
- Follows bottom up approach in program design.
Features of OOP (Object Oriented Programming):-
- Class
- Object
- Encapsulation
- Data Abstraction
- Inheritance
- Polymorphism
- Data binding
- Message Passing
Application of Object Oriented Programming:-
- User interface design such as windows, menu
- Real Time Systems such as Control system for cars, aircraft, space vehicles etc
- Office automation system such as Document Management System i.e. Word processing system, spread sheet software etc
- AI and Expert System
- Neural Networks and parallel programming System
- Decision support system etc
Advantages of OOP:-
1. Improved software-development productivity:
Object-oriented programming is modular, as it provides separation of duties in object-based program development. It is also extensible, as objects can be extended to include new attributes and behaviors. Objects can also be reused within an across applications. Because of these three factors – modularity, extensibility, and reusability – object-oriented programming provides improved software-development productivity over traditional procedure-based programming techniques.
2. Improved software maintainability:
Since the design is modular, part of the system can be updated in case of issues without a need to make large-scale changes.
3. Faster development:
Reuse enables faster development. Object-oriented programming languages come with rich libraries of objects, and code developed during projects is also reusable in future projects.
4. Lower cost of development:
The reuse of software also lowers the cost of development. Typically, more effort is put into the object-oriented analysis and design, which lowers the overall cost of development.
5. Higher-quality software:
Faster development of software and lower cost of development allows more time and resources to be used in the verification of the software. Although quality is dependent upon the experience of the teams, object oriented programming tends to result in higher-quality software.
Disadvantages of OOP:-
1. Larger program Size:
Object oriented programs are much larger than other programs. In the early days of computing, space on hard drives, floppy drives and in memory was at a premium. Today we do not have these restrictions.
2. Effort:
Object oriented programs require a lot of work to create. Specifically, a great deal of planning goes into an object oriented program well before a single piece of code is ever written. Initially, this early effort was felt by many to be a waste of time. In addition, because the programs were larger, coders spent more time actually writing the program.
3. Speed:
Object oriented programs are slower than other programs, partially because of their size. Other aspects of Object Oriented Programs also demand more system resources, thus slowing the program down.
Procedural Oriented Programming (POP)
- In the procedure oriented approach, large programs are divided into smaller programs known as functions.
- In POP, a program is written as a sequence of procedures or function.
- In POP, each procedure (function) contains a series of instructions for performing a specific task.
- During the program execution each procedure (function) can be called by the other procedures.
- To call a procedure (function), we have to write function name only.
- While we concentrate onto the development of functions, we give very little attention to the data that are being used by various functions.
- In POP, the major emphasis is on procedure (function) and not on the data.
- In a multi-function program, many important data items are placed as global so that they may be accessed by all the functions. Each function may have its own local data.
- Global data are more vulnerable to an accidental change by a function. In a large program it is very difficult to identify what data is used by which function.
- Examples of procedural oriented programming language are COBOL, FORTRAN, PASCAL, C programming language etc.
Characteristics of procedure-oriented programming:-
- Large programs are divided into smaller programs known as functions.
- Most of the functions share global data.
- Data move openly around the system from function to function.
- Functions change the value of data at any time from any place. (Functions transform data from one form to another.)
- It uses top-down approach in program design.
Drawback:-
- In POP, global data can be accessed & changed by any procedure (function) so there is no data security. In case if we want to change type of data of global data, then we also need to resolve all functions that access the data. Due to this it may happened that some errors will occurs
- POP does not model real world problems because functions are action oriented.
Difference between OOP and POP:
OOP |
POP |
Object oriented. |
Structure oriented. |
Program is divided into objects. |
Program is divided into functions. |
Bottom-up approach. |
Top-down approach. |
Inheritance property is used. |
Inheritance is not allowed. |
It uses access specifier. |
It doesn’t use access specifier. |
Encapsulation is used to hide the data. |
No data hiding. |
Concept of virtual function. |
No virtual function. |
Object functions are linked through message passing. |
Parts of program are linked through parameter passing. |
Adding new data and functions is easy |
Expanding new data and functions is not easy. |
The existing code can be reused. |
No code reusability. |
use for solving big problems. |
Not suitable for solving big problems. |
C++, Java. |
C, Pascal. |
Similar Reads
Differences between POP3 and IMAP
POP3 (Post Office Protocol 3) and IMAP (Internet Message Access Protocol) both are MAA (Message accessing agent), and both of these protocols are used to retrieve messages from the mail server to the receiver system. Both of these protocols are accounted for by spam and virus filters. IMAP is more f
6 min read
Difference between POS and EPOS
1. Point of Sale (POS) : Point of Sale (POS), as name suggest, is system where exchange or goods or services takes place manually. It includes both combination of hardware and software. 2. Electronic Point of Sale (EPOS) : Electronic Point of Sale (EPOS), as name suggests, is a software system that
2 min read
Difference between SMTP and POP3
In Computer Network,for sending and receiving messages, we use two protocols one is SMTP (Simple Mail Transfer Protocol) and another is POP3 (Post Office Protocol version 3). They are also called as PUSH and POP protocols respectively. They are agents, Message Transfer Agent, and Message Access Agen
4 min read
Difference between PHP and .NET
The current business sector is completely moving towards a digital market where each business irrespective of its size now requires its digital presence for the growth of the business. Every organization requires a website for their business as the first step of digital presence. When the demand for
4 min read
Difference between PHP and C#
PHP is the recursive acronym for Hypertext Preprocessor. It is the widely-used general-purpose scripting language that is especially used for web development and embedded into the HTML. Its scripts are executed on the server. Files of PHP contains HTML, CSS, JavaScript and PHP code. It is executed o
2 min read
Difference Between Golang and PHP
Golang is a statically typed, compiled programming language invented at Google headquarter by Mr. Robert Griesemer, Mr Rob Pike, and Mr. Ken Thompson. Its development began in 2007 and it was made available to the public in the year 2009. It's open-source and freely available for public use. It is m
2 min read
Difference between C++ and Go
C++ was developed by Bjarne Stroustrup at Bell Labs in 1979 as an extension of the C languageC++ is a general-purpose programming language and is widely used nowadays for competitive programming. It has imperative, object-oriented, and generic programming features. C++ is a widely popular language a
2 min read
Difference between iOS and OpenBSD
1. iOS : iOS is a mobile operating system which is provided by Apple Incorporation. It is mainly designed for Apple mobile devices like iPhone and iPod Touch. It was earlier known as iPhone OS. It is a Unix-like operating systems which is based on Darwin(BSD) operating system. It is the worldâs seco
2 min read
Difference between ROLAP, MOLAP and HOLAP
1. Relational Online Analytical Processing (ROLAP) : ROLAP servers are placed between relational backend server and client front-end tools. It uses relational or extended DBMS to store and manage warehouse data. ROLAP has basically 3 main components: Database Server, ROLAP server, and Front-end tool
3 min read
Difference between OODM and CDM
The Object Oriented Data Modeling and Conceptual Data Modeling can be referred to as two different approaches used for designing databases and systems. They are useful techniques of organizing and structuring the data in use within applications though they have their differences by focusing and unde
4 min read