Strategy and template method patterns