could you please help me with this program even with one part please:
Adding two strings (Actually, the correct term is concatenate because unlike adding two number and
getting a new result, we add a second string to the end of the first one and getting a string which is
basically the two string one right after the other).
Example: "Hello" + " World" = "Hello World" (do not add a space, notice it exist on the second string)
also, "U" + 2 = "U2" (for now you may assume that only integers will be added and not floats or doubles).
• Outputting a string to the output.
writing cout << s1 << endl; will result in outputting the string's contents to the screen.
this is easy because there is already an operator<< for char*
• Inputting a string to a MyString object.
writing cin >> s1; will result in s1 contents to contain the inputted string.
this is different than inputting a char* because operator>>(istream&,char*) assumes enough memory is
allocated for the input and it will override existing memory if input is larger than the allocated space.
In order to overcome this problem, define a static array of size MAX_STRING, read the char* input to it,
calculate the input's length, allocate the needed space and copy into the allocated memory.
• Get the length of a string. For a MyString object s1 that contains the string "Hello",
s1.Length() will return an integer representing the s1's length (without the /0).
• Indexing a string – allow your users to change the string in specific locations and retrieve specifics
characters from it.
For example, for s MyString objects s1 that contains the string "Hello",
the statement: char ch = s1[2]; would assign the third character of the string to ch. In this case ch is now
'l'.
Also, the statement: s1[4]=0 will cause s1 to change to "Hell".
so you need to support two functionalities with indexing (read the class and recitation notes)
• Find a character's index in a string. This function will scan the string for the char parameter and will return
the index of the first occurrence in the string. If the character does not appear in the string, return -1.