Object-Oriented VS python oriented process

Process-oriented programming: Firstly, a step needed to solve the problem (that is, "what to do first, what to do the second step, third step what to do"), then use the function to achieve each step, and then turn call.

Object-oriented programming: the program will be seen as a collection of objects, not a specific program execution when this thinking design code, consider (what to do after that is what to do first), but consider first create a class set in a good class properties and methods, what that is, and what to do, then, then the template to create an instance of an object class, good properties and methods you can use to call this instance of the class definition.

                         Write a class that is intuitive advantage with passing arguments will function to save a lot more than the ordinary, do not consider global variables and local variables, because the methods in the class can call the property directly. One can imagine the difficulty when the larger the project, the more the required parameters, written in the program with a class of scalability, readability, maintenance costs will be even better.
                         Object-Oriented Programming: object-centric, a computer program is a set of objects as a group.
 

Guess you like

Origin www.cnblogs.com/Through-Target/p/12105504.html