Strategy

Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it. 

  example duck application

  same super class, same function name, different function implementation

structure:

原文地址:https://www.cnblogs.com/jasonC/p/3437833.html