(Part 1)
"I understand. He said to implement it in any object-oriented language, that means to implement it in an object-oriented programming method, right? OK, I learned this, but I didn't expect it at the time ."
Laruence: "All Programming beginners will have this problem, that is, they will intuitively use the logic that computers can understand to describe and express the problem to be solved and the specific process of solving it. This is actually a computer-based approach. For example, the calculator program requires two numbers and operator numbers first, and then determines how to calculate the number based on the operator number, this is not wrong, but this thinking makes our program only to meet the current needs, the program is not easy to maintain, not easy to expand, not easy to reuse. This does not meet the requirements of high-quality code ."
Side dish: "I am confused, laruence. How can I make it easy to maintain, expand, and reuse? Can I be specific ?"
Laruence: "For example, if I want you to write another windows Calculator, can your current code be reused ?"
"That's not easy. Just copy the code? ."
Laruence: "It seems that it is still a small dish. Some people say that the job of junior programmers is Ctrl + C and Ctrl + V. This is actually a very bad coding habit, it may be a disaster to maintain your repeated code to a certain extent. The larger the system, the more serious the problem is. The principle of programming is to avoid repetition in the best way possible. Think about it. Which of the code you wrote has nothing to do with the console, but is only related to the calculator ?" (To be continued)