#include #include "WordT.h" #include using namespace std; void WordT::Word(string w) { word = w; count = 1; } string WordT::Word() const{ return word; } void WordT::Increment(void){ count ++; } int WordT::Count(void) const{ return count; } bool WordT::operator ==(const WordT & other) const{ return word == other.word; } bool WordT::operator < (const WordT & other) const{ if (count == other.count) { return word < other.word; } return count > other.count; } ostream & operator << (ostream & s, const WordT & other){ s << other.Word() << " " << other.Count(); return s; }