发表于2004/9/16 17:21:00 535人阅读
• It simplifies the addition of new operations.
• It gathers related operations while separating unrelated ones.
• An object structure contains many objects with differing interfaces and there is a need to perform operations on these objects in a way that depends on their concrete classes.
• Many distinct and unrelated operations need to be performed on objects in a structure and there is a need to avoid cluttering the classes with these operations.
• The classes defining the object structure rarely change but you frequently need to define new operations that perform over the structure.