Difference between Procedure Oriented and Object Oriented programming - GTech eAcademy

Watch Full Explanation on our YouTube channel  

https://www.youtube.com/watch?v=-RBlqzGGnF4

 

Procedural Programming vs Object Oriented Programming - GTech eAcademy
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 Questions

First, 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 variables

Structure of real world Procedural Programming approach

OR

Advantages of Procedural Programming approach

Procedural Programming: Real world program structure - GTech eAcademy
Procedural Programming: Real world program structure
1) Share global data with functions 2) Reusability of code using functions

Drawbacks of Procedural Programming approach

1) Tough Modification

Tough Modification - Procedural programming drawback - GTech eAcademy
Tough Modification - Procedural programming drawback
i) Inter-dependency between all functions ii) Make a change to one function, Break the several other functions

2) Security

Security - Procedural programming or c language drawback - GTech eAcademy
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.

OOP Approach - Overcome procedural programming drawback - GTech eAcademy
OOP Approach - Overcome procedural programming drawback

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 - GTech eAcademy
Access Modifier in OOP Approach - Overcome procedural programming drawback
In C#, there are six types of Access Modifier i) Public ii) Private iii) Protected v) Internal v) Protected Internal vi) Private Protected

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.

Please SUBSCRIBE & Share to support us 😀😀


- Ankush Garg

- GTech eAcademy (Technology can be fun) 

Follow us on Facebook


#GTecheAcademy #DifferenceBetweenProceduralAndObjectOrientedProgramming #ProcedureOrientedProgrammingVsObjectOrientedProgramming #hindi #WhyOOPS #ProceduralVsOOP #AdvantageOfProceduralProgramming #DisadvantageOfProceduralProgramming #GTechAcademy

Comments

Popular posts from this blog

C# Access Modifiers: What Why How | C#.Net Tutorial - GTech eAcademy

C# Namespace with real life example - GTech eAcademy