Skip to main content

Differences between Procedural programming & Object oriented programing

Difference between OOP and POP is shown below:

  • In POP, program is divided into small parts called functions. In OOP, program is divided into parts called objects. In POP, Importance is not given to data but to functions as well as sequence of actions to be done. In OOP, Importance is given to the data rather than procedures or functions because it works as a real world. POP follows Top Down approach. OOP follows Bottom Up approach. POP does not have any access specifier. OOP has access specifiers named Public, Private, Protected, etc. In POP, Data can move freely from function to function in the system. In OOP, objects can move and communicate with each other through member functions. To add new data and function in POP is not so easy. OOP provides an easy way to add new data and function. In POP, Most function uses Global data for sharing that can be accessed freely from function to function in the system. In OOP, data cannot move easily from function to function, it can be kept public or private so we can control the access of data. POP does not have any proper way for hiding data so it is less secure. OOP provides Data Hiding so provides more security. In POP, Overloading is not possible. In OOP, overloading is possible in the form of Function Overloading and Operator Overloading. Example of POP are : C, VB, FORTRAN, Pascal. Example of OOP are : C++, JAVA, VB.NET, C#.NET. 

Comments

Popular posts from this blog

JAVA DATABASE CONNECTIVITY

Java DataBase Connectivity JDBC stands for Java Database Connectivity. JDBC is a Java API to connect and execute the query with the database. It is a part of JavaSE (Java Standard Edition). JDBC API uses JDBC drivers to connect with the database. There are four types of JDBC drivers: o JDBC-ODBC Bridge Driver, o Native Driver, o Network Protocol Driver, and o Thin Driver We can use JDBC API to access tabular data stored in any relational database. By the help of JDBC API, we can save, update, delete and fetch data from the database. It is like Open Database Connectivity (ODBC) provided by Microsoft.                                         fig: JDBC  We can use JDBC API to handle database using Java program and can perform the following activities: 1. Connect to the database 2. Execute queries and update statements to the database 3. Retrieve the result received from th...

TOWER OF HONAI using recursion in c-programmimg

//TOWER OF HONAI #include <stdio.h> // recursive function to solve tower TOH void towerOfHanoi(int n, char from_rod, char to_rod, char aux_rod) {     if (n == 1)     {         printf("\n Move disk 1 from rod %c to rod %c", from_rod, to_rod);         return;     }     towerOfHanoi(n-1, from_rod, aux_rod, to_rod);     printf("\n Move disk %d from rod %c to rod %c", n, from_rod, to_rod);     towerOfHanoi(n-1, aux_rod, to_rod, from_rod); } int main() {     int n = 4; // Number of disks     towerOfHanoi(n, 'A', 'C', 'B');  // A, B and C are names of rods     return 0; }