What is the difference between procedural and object-oriented programming?

Technology CommunityCategory: OOPWhat is the difference between procedural and object-oriented programming?
VietMX Staff asked 3 years ago

Procedural programming is based upon the modular approach in which the larger programs are broken into procedures. Each procedure is a set of instructions that are executed one after another. On the other hand, OOP is based upon objects. An object consists of various elements, such as methods and variables.

Access modifiers are not used in procedural programming, which implies that the entire data can be accessed freely anywhere in the program. In OOP, you can specify the scope of a particular data by using access modifiers – publicprivateinternalprotected, and protected internal.