Differences between Object-Oriented Programming (OOP) and Procedure-Oriented Programming (POP)
Introduction
Presenter: Neha
Channel: YouTube Technology Channel
Topic: Differences between Object-Oriented Programming (OOP) and Procedure-Oriented Programming (POP)
What is Programming?
- Definition: Creating a set of instructions to perform certain tasks
- Languages: Can be high-level (user-friendly) or low-level (machine-friendly)
- Classifications: Procedural, Object-Oriented, Declarative, Logical, etc.
- Focus: Procedural and Object-Oriented programming
Procedure-Oriented Programming (POP)
- Definition: Programs are a sequence of instructions executed in order
- Structure: Large programs divided into units (functions, routines, subroutines)
- Data Handling: Functions can operate on global data (security concern)
- Popularity: Popular at the start of the 20th century; replaced by OOP
- Examples: C, COBOL, Pascal, VB
Object-Oriented Programming (OOP)
- Definition: Based on the concept of objects and classes
- Components:
- Object: Instance of a class, operations are performed on them
- Class: Describes the structure using data members and member functions
- Data Handling: Data tied to member functions, more secure
- Features: Inheritance, Data Abstraction, Encapsulation, Polymorphism
- Examples: C++, Java, .NET, C#
Differences between POP and OOP
- Approach:
- POP: Top-down
- OOP: Bottom-up
- Focus:
- POP: Procedure/task
- OOP: Data security
- Program Division:
- POP: Functions
- OOP: Objects
- Access Specifiers:
- POP: None
- OOP: Public, Private, Protected
- Overloading:
- POP: None
- OOP: Functions, Constructors, Operators
- Inheritance:
- POP: None
- OOP: Public, Private, Protected modes
- Data Sharing:
- POP: Global data shared by functions
- OOP: Objects share data through member functions
- Friend Function:
- POP: No concept
- OOP: Classes/functions can be friends
- Virtual Function:
- POP: No concept
- OOP: Supports virtual functions during inheritance
- Data Hiding:
- POP: Insecure
- OOP: Data hidden in Public/Private/Protected modes
- Code Reusability:
- POP: Limited
- OOP: Achieved through inheritance
- Program Size:
- Execution Speed:
- Examples:
- POP: C, VB, Fortran, Pascal
- OOP: C++, Java, .NET, C#
Additional Resources
- Website: techdifferences.com (URL in the video description)
Conclusion
- Call to Action: Like, share, and subscribe
- Interaction: Comment and queries below
- Future Updates: Stay tuned for more videos