0

Can please somebody Explain Object Oriented Programming to me

Hy Guys, I dont understand the difference between procedural and object oriented programming It seems to me that the difference is that the structure of the code is just different? And the explanations from Google didnt helped me to understand it Please if somebody can explain that to me that would be great

31st May 2021, 8:10 AM
Kevin
Kevin - avatar
5 Réponses
+ 2
Procedural programming is all about structuring your program in such a way that the flow of the program is one-way and concise e.g seperate the program into functions, avoid goto statements and so on. Avoid Spaghetti like pattern in your code. Use loops instead of recursion. Object oriented programming aims to place access restrictions on data in a large program. It does so by seperating the program into objects. Each object exposes limited data in form of variables and functions. Access to data is restricted based on what type of object wants to access the data. Procedural programming allows control over the flow of the program. OOP allows control over data access.
31st May 2021, 8:25 AM
Ore
Ore - avatar
+ 1
See buddy there are many links in which you will find your answer. (Talking about google) so you should go there and type your question there. I am sure you will get relevant results!
31st May 2021, 8:14 AM
NEZ
NEZ - avatar
0
Kevin strutures are defaultly public But classes are defaultly private. that's all.
31st May 2021, 8:18 AM
˜”*°•.˜”*°• Mohan 333 •°*”˜.•°*”˜
˜”*°•.˜”*°• Mohan 333 •°*”˜.•°*”˜ - avatar
0
they are both two different logic way of thinking/programming: procedural: use of variables and procedures (functions) to control the flow of execution object oriented: use of objects as core data structure (wich links properties and methods), along with variables and functions. in object concept, properties are kind of variables belonging to them, methods are functions binding the related object... and object instances are defined by classes/prototypes (another two ways of thinking) wich act as blueprint, allowing sharing properties/methods between same kind of objects, as well as defining specific ones to each... both procedural and object oriented could almost be used to mimic each other behavior ;)
31st May 2021, 4:28 PM
visph
visph - avatar