If you were to explain to a beginning programmer the difference
between PP and OPP, what analogies or examples would you use? They
don't have to be tied to any particular language or code.
E.g. If building a car were a program, how would you approach it in
PP or OPP?
Answer)
Before we step to the example let's understand what is PP and OOP.
The procedural programming language is defined as a straightforward language which contains proper designs, which contains good isolation an containment for the variables which when properly scoped with the functions and control loops makes a PP.
OOP or object-oriented programming language is a programming which is based on the concept of the objects that would contain data as fields, attributes, codes and procedures or methods.
Now coming to an example:
When building a car is a program then the vehicular movement as a whole is a procedural language whereas the motor, the engine, the steering movement, the wheels movement are all part of Object Oriented language because every single thing which can be named is an object and with the help of one object the other object is passed.
Hit like if you find the answer useful. :)
Hope this answer helps. Thanks
Get Answers For Free
Most questions answered within 1 hours.