CString class

Each modern programming language provides a way of expressing character strings. For instance, in C language, there is no built-in data type for strings, but instead, they appear as null-terminated character arrays. However, there is a library named string.h that includes several predefined string-handling functions. In C++, on the other hand, there is no built-in string object, however, there is a class named string in the standard C++ library that gives way better type-safe and more functionalities compared to the C library.
Thus, in this programming assignment, students are expected to study the standard C library, namely, the string.h, and convert it to a fully-operating class. To clarify the task, let me give a simple example as in the sequel.
In C, one can write a simple two-line code to present how a string stored in one array can be copied into another one.
char s1[] = “a string”, s2[10]; strcpy(s2, s1);
Note that in the example given above, we consider the standard C library function strcpy as safe. It is the Visual Studio environment that gives the alternative version strcpy_s for it with the claim that theirs better and safer.
In an attempt to convert those lines into the object-oriented way, one can rewrite it as below:
Cstring s1(“a string”), s2; s2.strcpy(s1);
List of functions to be included into the class declaration are strlen, strcpy, strncpy, strcat, strncat, strcmp, strncmp, strchr, strrchr, strstr, and strtok. List of operators that can be overloaded for the class are the assignment, addition, shorthand assignment, is equal to, is not equal to, is greater than, is greater than or at least equal to, is less than, and is less than or at least equal to. All member functions and operators listed should work without any problems. It is the students responsibility to visit, study, try, and learn the string.h library.
The instance of Cstring class should be a dynamic object compared to the classical C-style compile-time fixed character array!
As bonus, for those finding the assignment simple, students may try to make all listed operators/functions to work with C/C++ strings. For instance,
char s1[] = “a string”; Cstring s2; s2.strcpy(s1);
or
should also work!
Students should develop an interface file, an implementation file, and a driver program to prove all functionalities included in their class declaration are working without any side-effects!

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational