Strategy Pattern:

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

OO-Principles:

1.Encapsulate what varies.

2.Favor composition over interface.

3.Program to interfaces, not implementations.

strategy pattern

相关文章:

  • 2021-10-20
  • 2021-11-18
  • 2021-09-28
  • 2021-05-11
  • 2021-11-11
  • 2021-10-09
  • 2021-06-29
猜你喜欢
  • 2021-08-04
  • 2021-06-20
  • 2021-06-15
  • 2022-02-16
  • 2021-05-23
相关资源
相似解决方案