Published September 16, 2019
by Doug Klugh
Build different implementations of a single method or class to allow your software to dynamically choose which type of object best fulfills the current need. This may include calling a particular instance of an overloaded method based on argument types or instantiating a particular type of object to realize a specific use case. Common examples include implementation of the Abstract Factory Pattern and using Test Doubles as substitutes for production resources during testing.