#include "bool.h" class String { public: ///////////////////////////////////////////////// // Constructor (default) // // Creates a String and sets it to NULL // // Inputs: None. // // Outputs: None. // String(void); ///////////////////////////////////////////////// // Constructor // // Creates a String and assigns it the value // of str. // // Inputs: // // Outputs: // String(char* str); ///////////////////////////////////////////////// // Destructor // // // // // Inputs: // // Outputs: // ~String(void); ///////////////////////////////////////////////// // Copy constructor // // // // // Inputs: // // Outputs: // String(const String& otherString); ///////////////////////////////////////////////// // Function: // // // // // Inputs: // // Outputs: // void Reverse(void); ///////////////////////////////////////////////// // Function: ReverseNew // // Returns a new String that is the reverse of // itself. // // Inputs: // // Outputs: // String ReverseNew(void) const; ///////////////////////////////////////////////// // Function: // // // // // Inputs: // // Outputs: // Boolean isEqual(String otherString) const; ///////////////////////////////////////////////// // Function: // // // // // Inputs: // // Outputs: // Boolean isGreater(String otherString) const; ///////////////////////////////////////////////// // Function: // // // // // Inputs: // // Outputs: // void Set(char* str); ///////////////////////////////////////////////// // Function: // (Deep-copy operation) // // // // Inputs: // // Outputs: // void Set(const String& otherString); ///////////////////////////////////////////////// // Function: // // // // // Inputs: // // Outputs: // void Display(Boolean NewLine) const; ///////////////////////////////////////////////// // Function: // // // // // Inputs: // // Outputs: // int countChars(void) const; ///////////////////////////////////////////////// // Function: // // // // // Inputs: // // Outputs: // int countChars(char letter) const; private: char* string; };