Question: Create a class (to be named String), which will hold a string of characters (internal data representation is up to you). The member data elements

Create a class (to be named String), which will hold a string of characters (internal data representation is up to you). The member data elements should be private with public member functions to handle the following operations: Constructors - one with no parameters to initialize the class to empty; one with a pointer to a C type string as a parameter to initialize the class to contain a copy of that string; and one with a parameter that is of class String to initialize to a copy of that value. Comparison function (Compare) to allow the comparison of the String object to another String object or to a C type string.Concatenation function (Concat) to allow concatenation of the String object to another and to allow concatenation of the String object to a C type string.Copy function (Copy) to copy another String object into this one or copy a C type string into this object. Display function (Display) to display the characters in the String object. Length function (Len) to return the number of characters stored in the String object. An electronic copy of the .cpp and .h files in the project folder as created by Visual Studio.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!