105
0
C++

Why use Object Oriented Programming?

105
0
Why use Object Oriented Programming?

Procedural and object oriented programming are two different ways to do the same thing. Neither style is “better” than the other, largely due to personal preference.

  • Easy to map onto real-world situations: As it is mentioned earlier, objects can be easily mapped onto real-world “objects” such as people, products, shopping carts, blog posts, and so on. This makes it easier to design object-oriented applications, since the purpose of each object, as well as the relationship between objects, is already reasonably clear.
  • Easy to write modular code: OOP naturally lends itself to writing code in self-contained modules. By separating code into distinct modules, the code becomes more manageable, and it’s easier to debug and extend it.
  • Easy to write reusable code: Writing reusable code can save a great deal of time when writing an app, and a library of reusable code modules can be built that are used in many different apps. OOP makes it relatively easy to write reusable code since data structures and functions are nicely encapsulated in a single, reusable object. It’s also possible to take an existing object and extend it to add new functionality for a specific application, making objects easy to reuse.
xalgord
WRITTEN BY

xalgord

Highly motivated, Hard-working, and Resourceful Programmer. I Love To Explain And Teach Technology, Solve Tech Problems And Learn Something New Every Day.

Leave a Reply