#include #include // has setw() #include // has toupper() // Function Declarations void obtainName(char name[], const int nameLength); void upperCase(char name[]); void printFramedName(const char name[]); int stringLength(const char name[]); void printStarLine(const int width); void printFrameEdgeLine(const int width); void printCenteredLine(const int width, const char name[]); int main() { const int nameLength = 1000; char name[nameLength]; // Input obtainName(name, nameLength); // Processing upperCase(name); // Output printFramedName(name); return 0; } // preconditions: nm = array to hold a name // nmLength = nm's length void obtainName(char name[], const int nameLength) { cout << "Please enter your name: "; cin >> setw(nameLength) >> name; return; } // precondition: nm holds a null-terminated string // postcondition: string has all uppercase characters void upperCase(char name[]){ int index; for (index = 0; name[index] != '\0'; ++index) name[index] = toupper(name[index]); return; } // precondition: name has a null-terminated string in uppercase // postcondition: printed frame and centered name void printFramedName(const char name[]) { int width = 4 + stringLength(name); printStarLine(width); printFrameEdgeLine(width); printCenteredLine(width, name); printFrameEdgeLine(width); printStarLine(width); return; } // HERE