A class uses multiple conditional statements in its operations to define many behaviors. You can move related conditional branches into their own strategy class.
You need different variants of an algorithm.
You need to avoid exposing complex and algorithm-specific data structures to clients.
转载于:https://www.cnblogs.com/zhtf2014/archive/2012/05/14/2499354.html
相关资源:垃圾分类数据集及代码