What is Object Oriented Programming?

Object Oriented is a software development method. Object-oriented concepts and applications have gone beyond programming and software development, and have expanded to areas such as database systems, interactive interfaces, application structures, application platforms, distributed systems, network management structures, CAD technology, artificial intelligence, and other fields. Object-oriented is a method of understanding and abstracting the real world. It is the product of the development of computer programming technology to a certain stage.

Early computer programming was based on a process-oriented approach, such as implementing arithmetic operations 1 + 1 + 2 = 4, by designing an algorithm to solve the problem at the time. With the continuous improvement of computer technology, computers are used to solve increasingly complex problems. Everything is an object. In an object-oriented way, abstract things in the real world into objects, and relationships in the real world into classes,
Facing
The meaning of the object refers to a specific thing, that is, something that can be seen and touched in real life. In object-oriented programming, an object refers to a component in a computer system. In object-oriented programming, objects have two meanings, one is data and the other is action. Objects are a combination of data and actions. The object can not only perform operations, but also record the operation results in time. [3]
(1) Object uniqueness.
Each object has its own unique identifier, and through this identifier, the corresponding object can be found. The identity of an object does not change throughout its lifetime. Different objects cannot have the same identity. [2]
Research on object-oriented development methods has become increasingly mature, and many object-oriented products have appeared internationally. Object-oriented development methods include Coad method, Booch method and OMT method. [2]
Extraction of object-oriented methods is similar

Object -oriented " object -oriented" and "object-based"

The three object-oriented characteristics (encapsulation, inheritance, and polymorphism) are all indispensable. "Object-based" usually uses objects, but it is impossible to use existing object templates to generate new object types, and then generate new objects, which means that "object-based" has no inherited characteristics. "Polymorphism" means a subclass object instance of the parent type. Without the concept of inheritance, it is impossible to talk about "polymorphism". Many popular technologies are based on objects. They use some encapsulated objects, call the methods of the objects, and set the properties of the objects. But they cannot allow programmers to derive new object types. They can only use methods and properties of existing objects. So when you judge whether a new technology is object-oriented, you can usually use the latter two characteristics to judge. Both "object-oriented" and "object-based" implement the concept of "encapsulation", but object-oriented implements "inheritance and polymorphism", and "object-based" does not implement these, which is indeed a slap. [2]

Object - oriented "process-oriented" and "object-oriented"

Process-oriented is to analyze the steps needed to solve the problem, and then use functions to implement these steps step by step, and call them one by one when used; object-oriented is to decompose the problem transaction into various objects, the purpose of creating objects is not To complete a step, but to describe the behavior of something throughout the problem-solving steps. [2]
You can use the examples in life to understand process-oriented and object-oriented, such as Gomoku. The process-oriented design idea is to analyze the steps of the problem first: 1. Start the game, 2. The sunspot goes first, 3. Draw the picture, 4. Determine the winning or losing. 5, Baizi's turn, 6, draw the picture, 7, judge winning or losing, 8, return to step 2, 9 and output the final result. Implement each of the above steps in different ways. [2]
If it is an object-oriented design idea to solve the problem. Object-oriented design solves problems from a different perspective. The entire backgammon can be divided into 1, black and white, the behavior of the two parties is exactly the same, 2. the chessboard system is responsible for drawing pictures, 3. the rules system is responsible for judging fouls, winning and losing, etc. The first type of object (player object) is responsible for accepting user input and notifying the second type of object (board object) that the layout of the pieces has changed. The board object is responsible for displaying this change on the screen when it receives the change of the pieces, while using the first Three types of objects (rule systems) are used to judge the game. [2]
It's clear that object-orientation divides problems by functions, not steps. It is also a drawing chess game. Such behavior is scattered in multiple steps in process-oriented design, and different drawing versions are likely to appear, because designers usually take various actual simplifications into consideration. In object-oriented design, drawing can only appear in checkerboard objects, thereby ensuring the uniformity of drawing. [2]

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?