// Dictionary.h // a vector of pointers to trees 'a' through 'z'. // each vector element points to a BST holding words // for example the vector element 'a' would point to // a BST with all words beginning with the letter 'a' #ifndef DICTIONARY_CLASS #define DICTIONARY_CLASS #include #include #include "Bst.h" class Dictionary { std::vector alphabet; public: // default constructor // initializes alphabet to 'a' through 'z' Dictionary(); // copy constructor // makes copy of other // calls copy() Dictionary(const Dictionary & other); // destructor // calls makeEmpty() ~Dictionary(); // assignment operator Dictionary & operator=(const Dictionary &); // prints all words in the dictionary // calls Bst print function void print(); // adds a word to the dictionary in the appropriate place // returns true if successfully added // otherwise returns false bool add(std::string word); // returns true if word exists, false otherwise bool exists(std::string word); // reads all words in dictionary from // the file: dictionary.txt // each word appears on a line by itself followed // by a newline void reader(); private: // YOU MAY PLACE ANY PRIVATE FUNCTIONS NEEDED HERE }; #endif // DICTIONARY_CLASS