// Pair.h // 1st part consists of a string (plaintext) // the string can be a word or phrase // 2nd part consists of a 4 digit number // number may have leading zeroes #ifndef PAIR_CLASS #define PAIR_CLASS #include class Pair { private: std::string text; std::string code; public: // default constructor // initializes data members to default values Pair(); // constructor to initialize text to t // and initialize code to c Pair(std::string t, std::string c); // accessor for text // returns the value of the text string std::string getText() const; // accessor for code // returns the value of the code std::string getCode() const; // mutator for text // changes value of text to t void setText(std::string t); // mutator for code // changes value of code to c void setCode(std::string c); // writes the plaintext word // without spaces or newline void writeText() const; // writes the codeword // without spaces or newline void writeCode() const; // makes the word plural // by doubling the code // for example if "beet" is encoded as 1472 // then "beets" would be encoded as 2944 // returns the doubled code, ie 2944 std::string makePlural(); private: // you may add any other private methods here }; #endif // PAIR_CLASS