Testing error while posting code. Don't know what's wrong.
Code:
// ****** Main.cpp ******
#include "SortingMachine.h"
#include "SortStrategy.h"
#include "AscendSort.h"
#include "DescendSort.h"
#include <iostream>
#include <string>
#include <cassert>
using namespace std;
int main()
{
string sortedString[] = { "a", "b", "c" };
SortingMachine* sm = new SortingMachine;
sm->SetArray( sortedString, 3 );
sm->SetSortStrategy( new AscendSort );
assert( sm->IsSorted() );
sm->SetSortStrategy( new DescendSort );
assert( !sm->IsSorted() );
delete sm;
for(int i=0 ; i<3 ; ++i)
cout<<sortedString[i]<<endl;
cout<<"OK"<<endl;
return EXIT_SUCCESS;
}