因此,必须对假设的条件仔细证明,并且这些模式被严格地封装了起来,因为即使非常小的更改也会损坏您的代码!
It is critical that your assumptions be carefully documented and these patterns strongly encapsulated because very small changes can break your code!
如果处理各个包的条件发生更改或者使用新的送货类型时,则使用此模式尤为便利。
This is especially handy if the criteria change for handling various packages or if a new type of shipping becomes available.
应用推荐