#include using namespace std; #include "AssignmentClass.h" int main( ){ vector* word1 = new vector("class"); vector* word2 = new vector("instance"); if(*word1 > *word2) throw "Bad implementation of vector operator"; vector* def1 = new vector("A collection containing members regarded as having certain attributes in common; a kind or category."); vector* def2 = new vector("One that is representative of a class"); Dictionnary* Test1 = new Dictionnary( *word1, *def1); Test1->insert(vectorTree(word2, def2)); if(!(Test1->operator [](0).Word->operator ==(*word1))) throw "run-time error"; if(!(Test1->operator [](1).Word->operator ==(*word2))) throw "run-time error"; delete word1; delete def1; delete word2; delete def2; Dictionnary Test2(*Test1); delete Test1; vector* word3 = new vector("inheritance"); vector* def3 = new vector("The process of genetic transmission of traits from parents to offspring."); Test2.insert(vectorTree(word3, def3)); if(!(vector("inheritance")==(*Test2[1].Word))) throw "run time"; Dictionnary Test3(*word3, *def3); delete word3; delete def3; Test3 = Test2; if(!(Test3 == Test2)) throw "run time error"; Test3.insert(vectorTree(&(vector("csi2172")), &(vector("C++ Prog class")))); if(Test3 == Test2) throw "run time error"; return 0; }