Introduction - If you have any usage issues, please Google them yourself
design patterns-- Visitor visitors model allows us to model without changing the original structure on the basis of constantly adding new features. ICumulation interface definition of the method Cumulate (), designed to calculate a+2+ ...+ n, there are two different method, a general superposition GeneralArithmetic algorithm, is a Gaussian algorithms GaoSiArithmetic. For some reason, the system needs to add functions for the average, there is a calculation of n and the square. As a general idea, we need to define ICumulation two methods were calculated and the average square, and in achieving category by adding the corresponding method. The erection of a visitor model, after adding functional code are transferred to ICumulationVisitor, adding the two functions were also a subclass Aver