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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started