// Decoder.h // decodes a sequence of 4 digit numerals // separated by a single blank // code numerals are stored in a vector // translates these to strings/expressions // based upon the Decodebook // decoder holds a vector of 4 digit strings #ifndef DECODE_CLASS #define DECODE_CLASS #include #include #include "Decodebook.h" class Decoder { private: Decodebook dcb; std::vector code; std::string message; public: // default constructor // sets private data members to default values Decoder(); // inserts the code string into a vector void insert(std::string); // reads the coded message AS IS void reader(); // prints the encoded message // (ie. the contents of the vector) void printCode() const; // prints the plaintext that is associated with code void printPlain() const; // puts the decoded message into a string // uses the Decodebook class // changes any word "halt" to a . (period) void decode(); // makes the text singular // by halving the code number void makeSingular(std::string &); private: // you may place any private methods you need here }; #endif // DECODE_CLASS