First a definition: in the simplest terms, you can define the Strategy Pattern as telling an object to do a job and to do it using ANOTHER object. To clarify this further I’m going to redesign the ShoppingCart slightly, by giving it a pay()* method: public class ShoppingCart { private final List<Item> items; public ShoppingCart() { items = new ArrayList<Item>(); ...
Read More »