簡言之,template method pattern就是將不同的member function用class包起來,由derived class去改寫。
Template methods use inheritance to vary part of an algorithm. strategy pattern use delegation to vary the entire algorithm.
Search
簡言之,template method pattern就是將不同的member function用class包起來,由derived class去改寫。
Template methods use inheritance to vary part of an algorithm. strategy pattern use delegation to vary the entire algorithm.