Difference between Procedure Oriented and Object Oriented programming - GTech eAcademy
Watch Full Explanation on our YouTube channel
https://www.youtube.com/watch?v=-RBlqzGGnF4
Understand the difference between POP & OOP in detail with real life programming example Procedure Oriented vs Object Oriented Paradigm OR C Language vs C++ language |
Discussion points
1) What is Procedural Programming (POP)? 2) Drawbacks of Procedural Programming 3) Overcome drawbacks using Object Oriented Programming (OOP) ***Understand above points with real life programming examples*** 4) Interview QuestionsFirst, understand What is Programming Paradigm
1) The term programming paradigm refers to a style of programming. 2) Common programming paradigms include i) Procedural Programming Paradigm ii) Object Oriented Programming Paradigm iii) Functional Programming Paradigm 3) One paradigm does not refer to a specific language 4) There are lots of programming languages that are well-known but all of them need to follow some strategy when they are implemented. And that strategy is a paradigm.What is Procedural Programming (POP)
This style of programming follows three steps 1) Divide a program into a set of functions 2) Data stored in a bunch of variables 3) Functions operate on these variablesStructure of real world Procedural Programming approach
ORAdvantages of Procedural Programming approach
Procedural Programming: Real world program structure |
Drawbacks of Procedural Programming approach
1) Tough Modification
Tough Modification - Procedural programming drawback |
2) Security
Security - Procedural programming drawback |
i) Functions share global data
Overcome POP drawbacks using Object Oriented Programming (OOP)
1) Tough Modification:
OOP approach combines a group of related variables and functions into a unit, to make loosely coupled code.
And OOP concepts (like Encapsulation, Abstraction, Inheritance etc.) make clarity, modularity, modifiability, extensibility, maintainability in programming
2) Security:
OOP approach provides security in programs using the Access Modifier concept.
Access Modifier in OOP Approach - Overcome procedural programming drawback |
Interview Questions
1) Difference between POP and OOP paradigm? Ans. OOP approach overcomes the following Procedural approach problems - i) Data Security: No Access Modifier concept ii) Tough Modification: Inter-dependency between all functions & less scope of code reusability as compare to OOP (because of Inheritance Concept in OOP) 2) How will you implement the security in OOP? Ans. Using the concept of Access Modifier 3) Why are the people using C language if it does not provide security? Ans. C language is widely used in Embedded System Programming like Calculator where no need to implement security 4) Why OOP? Ans. i) OOPs allows clarity in programming, modularity, modifiability, extensibility, maintainability, ii) Data Security / Data Hiding: Because of the Access Modifier concept iii) More Code Reusability: Because of Inheritance concept***********************************************************************************
Our main focus is to provide free e-learning videos related to programming languages.
- Ankush Garg
- GTech eAcademy (Technology can be fun)
#GTecheAcademy #DifferenceBetweenProceduralAndObjectOrientedProgramming #ProcedureOrientedProgrammingVsObjectOrientedProgramming #hindi #WhyOOPS #ProceduralVsOOP #AdvantageOfProceduralProgramming #DisadvantageOfProceduralProgramming #GTechAcademy
Comments
Post a Comment