//-------------------------------------------------------------------- // // WordCount // //-------------------------------------------------------------------- #ifndef _WORD_COUNT_ #define _WORD_COUNT_ #include #include "stradt.h" class WordCount { public: // Constructors WordCount ( ); // Create an empty string // Access operations void initialize (Stradt new_word); // and count = 0 Stradt word (); // int count (); // void increment (); // add 1 to count void reset (); // set count to 0 // Comparison operations int operator!= (WordCount another); private: // Data members Stradt my_word; // My assigned word int my_count; // Current count for word }; #endif