Southwind : Gof Patterns example of Template method and Strategy patterns
Southwind C++ (codeblocks ide) project for GoF patterns practicing. It takes as example a possible template method from the trader company "Southwind" and the use of 2 different Strategies (Kanban and JustInTime). Files in project: main.cpp : #include #include "templatemethod.h" #include using namespace std; int main() { const static vector * catalog = {"Tablets offer", "SmartPhones offer", "Javas offer", "Androids offer", "Creatives offer"}; const static vector * locations = {"KanbanCity","JustInTimeCity"}; int status = -1; map > * tradingdata; Strategy * strategy = NULL; Context* context = NULL; TraderCompany* southwind = NULL; vector * preorder = createPreOrder(catalog); string* location = getLocation(locations); if(location->compare(locations->at(0))== 0)) /* we work with Kanban city */ strategy = new KanbanStrategy(); else strategy = new Justi...