Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Refer to the following article: https://www.cnblogs.com/lewis0077/p/5133812.html
Strategy pattern personal experience:
1. Clear the code may be a plurality if else
2. each policy can replace each other algorithms
3. If the policy is changed, the new interface implementation class directly to the basic need major changes
4. good scalability and maintainability