Let’s take the mailing service in an online store as an example. This a set of objects from goods and customers. And there a set of methods — actions invented by the programmer in the mailing. For example, for purchases, the .Delete method is to warn the buyer, and then send it to the archive. And for the user, the delete method to unsubscribe from the newsletter and delete the account. The method can work differently in different objects. But the programmer knows about it, so he trusts.
Complex programs look and easier
Delete method and does not invent synonyms. Pros and cons of oop object-oriented programming has many advantages. all modern programming languages. Here a partial list of programming languages that support oop principles: python,ruby, java script, objective-c. And, for example, java is a pure object-oriented language. The code is easy to read. Do you New Zealand Mobile Number List remember the structure of the program in procedural programming: a tree of lines of code, where to add an element — rewrite part of the tree and add roots. In oop, everything is divided into objects and it is immediately clear what it consists of and what other objects take from it. Less copy paste.
Therefore the approach ised in almost
In procedural programming, it is not unusual to rewrite the same values twice for similar code. In oop, copy pasting solved by the principle of inheritance. to write . At the beginning of the article, we cited our world as an example of a comprehensive USA Business program. breaks the world into small blocks – they are easy to write. And if necessary, delve into a specific object in detail. There is no “Language barrier” between programmers: the work of the former can be easily read by the latter.