当前位置:网站首页>2022/02/13
2022/02/13
2022-07-05 02:21:00 【ekkoxxxx】
Today I saw the object-oriented analysis method , This paper compares the difference between object-oriented and process oriented programming , See an example that is easy to understand , Take Gobang for example .
Process oriented programming : The idea of programming is based on the actual process of playing chess , Start the game –> Go ahead with sunspots –> Drawing picture –> Judgement of winning or losing –> Turn white –> Drawing picture –> Judgement of winning or losing –> Go back to step two –> Output results . The process of writing a program is to realize each step layer by layer . The advantage is that performance is higher than object-oriented programming .( Because class calls need to be instantiated ,new You need to allocate memory for the object , Compare the consumption of resources ??)
object-oriented programming : It can be said that it is divided into user layer at the functional level 、 Checkerboard layer 、 Rule layer . The user layer is the black and white sides of the executive , Responsible for receiving user input , Then it goes to the chessboard layer ; The chessboard layer is responsible for drawing pictures , Then pass the chess situation to the rule layer ; The rule layer is used to judge whether the chess game continues 、 Whether any side has won , And end the game . Object oriented programming has encapsulation 、 polymorphism 、( inheritance , Forget about this ..). The advantage is relative to process oriented programming , Easy to maintain 、 Easy to expand .
边栏推荐
- Unified blog writing environment
- [技术发展-26]:新型信息与通信网络的数据安全
- Erreur de type de datagramme MySQL en utilisant Druid
- Redis' hyperloglog as a powerful tool for active user statistics
- The steering wheel can be turned for one and a half turns. Is there any difference between it and two turns
- Restful Fast Request 2022.2.1发布,支持cURL导入
- [illumination du destin - 38]: Ghost Valley - chapitre 5 Flying clamp - one of the Warnings: There is a kind of killing called "hold Kill"
- The MySQL team development specifications used by various factories are too detailed. It is recommended to collect them!
- Valentine's Day flirting with girls to force a small way, one can learn
- runc hang 导致 Kubernetes 节点 NotReady
猜你喜欢

LeetCode 314. Binary tree vertical order traversal - Binary Tree Series Question 6

JVM's responsibility - load and run bytecode

【LeetCode】222. The number of nodes of a complete binary tree (2 mistakes)

How to build a technical team that will bring down the company?

Can you really learn 3DMAX modeling by self-study?

Variables in postman

Traditional chips and AI chips

Binary tree traversal - middle order traversal (golang)
![[uc/os-iii] chapter 1.2.3.4 understanding RTOS](/img/33/1d94583a834060cc31cab36db09d6e.jpg)
[uc/os-iii] chapter 1.2.3.4 understanding RTOS

A label making navigation bar
随机推荐
Richview trvunits image display units
使用druid连接MySQL数据库报类型错误
Video display and hiding of imitation tudou.com
openresty ngx_lua变量操作
Advanced conditional statements of common SQL operations
Abacus mental arithmetic test
How to find hot projects in 2022? Dena community project progress follow-up, there is always a dish for you (1)
Introduce reflow & repaint, and how to optimize it?
Official announcement! The third cloud native programming challenge is officially launched!
STM32 series - serial port UART software pin internal pull-up or external resistance pull-up - cause problem search
Open source SPL optimized report application coping endlessly
Icu4c 70 source code download and compilation (win10, vs2022)
A label colorful navigation bar
Win: use shadow mode to view the Desktop Session of a remote user
Outlook:总是提示输入用户密码
Numpy library introductory tutorial: basic knowledge summary
Restful fast request 2022.2.1 release, support curl import
Interpretation of mask RCNN paper
Rabbit MQ message sending of vertx
Vulnstack3