A study of the strategy pattern