I. Object-oriented programming (OOP)
program = algorithm + data structure = instruction + statistics
1. The code can choose to write at the command or at the core of the data
Two types of paradigms:
command-centric: writing around "What's going On"
process-Oriented programming: The program has a series of linear steps; The main idea is that code is used for data
data-centric: Writing around "Who's going to be affected"
Object-Oriented programming (OOP): organizes programs around data and interfaces that are strictly defined for data, and Controls access to code with data
2. Object-oriented core concept
The ultimate goal of all programming languages is to provide an abstract approach
between the machine model ("solution space" or "solution space") and the Problem model ("problem space") that is actually solved, the programmer must establish a connection
Process oriented: program = algorithm + data structure
Object-oriented: Abstracts elements in the problem space and their representations in the solution space into objects and allows problems to be described rather than scenarios
You can think of an instance as a new variable that holds the data but can perform operations on its own data.
This article is from the "Xiexiaojun" blog, make sure to keep this source http://xiexiaojun.blog.51cto.com/2305291/1861205
Python class and object-oriented