当前位置:网站首页>What are the principles of software design (OCP)

What are the principles of software design (OCP)

2022-07-06 02:54:00 FYHannnnnn

Article transferred from What is software design (OCP) principle _shanglizhangrui The column -CSDN Blog


When designing a module , The module should be extended without modification .

(1) Open to expansion
That is, when you want to expand the function , There is no need to change the internal code block , It can be extended directly ;
(2) Changes are closed
When extending a module , The internal code does not need to be changed .

原网站

版权声明
本文为[FYHannnnnn]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202132344532115.html