Algorithm Encapsulation
← Back to Strategy
Each algorithm is encapsulated in its own class implementing a common interface. This allows algorithms to be selected, swapped, or added without modifying the context class that uses them.
← Back to Strategy
Each algorithm is encapsulated in its own class implementing a common interface. This allows algorithms to be selected, swapped, or added without modifying the context class that uses them.