// Node.h - letter consists of a plaintext character // plainLeft points to plaintext letter to left // plainRight points to plaintext letter to right // cipher points to cipher char associated with // current plaintext char // cipherRight points to cipher letter to right // plaintext letters form a circular dll // cipher letters form a circular singly linked list #ifndef NODE_CLASS #define NODE_CLASS #include class Node { char letter; // plaintext letter Node * plainLeft; // points to previous plaintext letter to left Node * plainRight; // points to next plaintext letter to right Node * cipher; // points to letter plaintext will be enciphered into Node * cipherRight; // points to next cipher letter public: // default constructor // initializes pointers to NULL Node(); // constructor with plaintext letter x // and pl = plainLeft, pr = plainRight Node(char x, Node *pl = NULL, Node *pr = NULL); // returns the value of the plaintext character char getLetter() const; // returns pointer to node that plainLeft points to Node * getPlainLeft() const; // returns pointer to node that plainRight points to Node * getPlainRight() const; // returns pointer to node that contains corresponding cipher Node * getCipher() const; // returns pointer to node that cipherRight points to Node * getCipherRight() const; // sets the value of the plaintext character to pl void setLetter(char pl); // mutator - changes value of plainLeft to pl void setPlainLeft(Node * pl); // mutator - changes value of plainRight to pr void setPlainRight(Node * pr); // mutator - changes value of cipher letter to cl void setCipher(Node * cl); // mutator - changes value of cipherRight to cr void setCipherRight(Node * cr); // writes the contents of a single Node // writes the following: cipher = k // writes the following: plntxt = f void writer() const; private: // YOU MAY ADD ANY OTHER PRIVATE METHODS HERE }; #endif // NODE_CLASS