Home  >  Article  >  What is the basic mechanism of object-oriented programming?

What is the basic mechanism of object-oriented programming?

藏色散人
藏色散人Original
2020-07-28 11:33:059775browse

The basic mechanism of object-oriented programming is "inheritance". The full English name of object-oriented programming is "Object Oriented Programming", which is a computer programming architecture. A basic principle of object-oriented programming is that a computer program is composed of a single A combination of units or objects that can function as subroutines.

What is the basic mechanism of object-oriented programming?

The basic mechanism of object-oriented programming is "inheritance".

As a new method, object-oriented programming (Object Oriented Programming) is essentially an abstract thinking process and object-oriented method reflected in the establishment of models.

Models are used to reflect the characteristics of things in the real world. It is impossible for any model to reflect all the specific characteristics of objective things. It can only be an abstraction of the characteristics and changing laws of things, and it can describe the characteristics of the object more generally, more concentratedly, and more profoundly within the scope it involves. The abstraction achieved by building models is the deepening of people's understanding of objects.

Overview:

Object-oriented programming (Object Oriented Programming, OOP) is a computer programming architecture. A basic principle of OOP is that a computer program is composed of a single unit or object that can function as a subroutine. OOP achieves the three main goals of software engineering: reusability, flexibility, and scalability. OOP=Object Class Inheritance Polymorphic Message, where the core concepts are classes and objects.

The object-oriented programming method is to simulate the human way of thinking as much as possible, so that the software development methods and processes are as close as possible to the methods and processes of humans understanding the world and solving real problems, that is, even describing the problem space of the problem Be as consistent as possible in structure with the solution space of the problem, and abstract the entities in the objective world into objects in the problem domain.

Object-oriented programming takes objects as the core. This method believes that the program is composed of a series of objects. A class is an abstraction of the real world, including data representing static attributes and operations on data, and an object is an instantiation of a class. Objects communicate with each other through message passing to simulate the connection between different entities in the real world. In object-oriented programming, objects are the basic modules that make up a program.

The above is the detailed content of What is the basic mechanism of object-oriented programming?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn