Application of algorithms in POO

Asked

Viewed 281 times

1

The programming algorithm/logic is geared towards structured programming. How would it apply algorithm in POO?

  • You ask how it would be, for example, object-oriented programming logic?

  • It would not change so much, of course depending on the desired implementation. I recommend you look at studying data structure in object-oriented languages, such as Java. When I was studying structures I studied object-oriented language and applied C which is structural.

  • Yes, that ae, for when, because it is very dynamic the POO.

  • You have functional algorithm, structured algorithm, oriented algorithm the existence of functions that reside to entities, object-oriented algorithm itself, "assembly language" algorithm, Turing machine algorithm, unrestricted grammars... Algorithm is a sequence of finite rules for computing/calculating

1 answer

4


Object-oriented programming has nothing to do with algorithm, it has to do with data structure.

Of course, how you structure the data affects how you do the algorithm, but it’s more about the organization than it is about itself. For example, the use of conditional deviations is reduced and decisions based on which object was instantiated are adopted. It changes the way internal and external algorithms communicate. Changes the way to codify certain activities because of the commitments made by an object in this paradigm.

There are controversies even if OO is a paradigm. It is, but secondary. Without another paradigm, there is no OOP.

So this obsession that people have with doing everything OOP doesn’t make sense. The obsession is so great that most do not even bother to learn the paradigm to apply in the correct form where needed. She just means she did OOP because they say doing it like this is all better, which is another lie, too. There is scenario that does not look good with OO and if you do OO wrong it will certainly be bad, probably worse than without OO.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.