Search code examples
oopdynamic-programmingparadigms

What's the difference between object-oriented and dynamic programming


I know that dynamic programming refers to an approach where we tend to break down a complex problem into smaller parts. In other words, it's a divide-and-conquer paradigm. Object-oriented programming also uses the concept of classes and modules, and therefore follows the separation of concerns (SoC) principle. Can we therefore say that OO is an example of dynamic programming?

Note: Dynamic here doesn't mean dynamic typing or dynamic scripting language. It refers to the general approach.


Solution

  • Dynamic programming is an algorithm designing approach.

    Object Oriented programming is more like a code organising methodology.

    Comparing them is like comparing kilometre with kilogram.

    (And Linear programming is also a totally different thing. It is for optimizing complex linear equations. It is more mathematics than programming. And Integer programming is a special case of it.)