LoginSignup
0

More than 3 years have passed since last update.

posted at

updated at

Strategy Pattern

Strategy Pattern

  • a class behavior or its algorithm can be changed at run time.
  • we create objects which represent various strategies and a context object whose behavior varies as per its strategy object. The strategy object changes the executing algorithm of the context object.
  • similar to "State Pattern". "State Pattern" use different object based on state but "Strategy Pattern" is based on strategy.

Reference

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
0