Question: Code in C++ please with comments to understand steps In this assignment you need to write a String Class. That's it! Piece of cake. You

Code in C++ please with comments to understand steps

Code in C++ please with comments to understand steps In this assignment

you need to write a String Class. That's it! Piece of cake.

You can only use dynamic arrays of characters for this assignment. No

In this assignment you need to write a String Class. That's it! Piece of cake. You can only use dynamic arrays of characters for this assignment. No strings! Your string class should allow for the following operations. You will overload the operators accordingly. To get full points you have to overload the following operators to do as follows Sample Code: String A "Potatoe"; String B "are String C-"Easy" String D; String E- "otat" +(Concatenation): Grarmmar B: Ae s-> A-> B-> A-> +'A-> +'B-> +' A-> +' B-> +' E +" D-C+A Should store in D- "EasyPotatoe It should work the same way concatenation works with C+'s normal string datatype -(Subtraction): D-A-E Should store in D - "Poe" Subtraction should remove the first instance (left to right) of that combination of letters. So if we had "Banana" and we are subtracting "ana" from it the resulting string would be "Bna" and NOT "Ban Another example if we had "Banana" and we were subtracting "a" from it we would get "Bnana". Note that we will not deal with negative strings so if givenA-E, IfE>A then return A. * (Multiplication) - *, *, In this assignment you need to write a String Class. That's it! Piece of cake. You can only use dynamic arrays of characters for this assignment. No strings! Your string class should allow for the following operations. You will overload the operators accordingly. To get full points you have to overload the following operators to do as follows Sample Code: String A "Potatoe"; String B "are String C-"Easy" String D; String E- "otat" +(Concatenation): Grarmmar B: Ae s-> A-> B-> A-> +'A-> +'B-> +' A-> +' B-> +' E +" D-C+A Should store in D- "EasyPotatoe It should work the same way concatenation works with C+'s normal string datatype -(Subtraction): D-A-E Should store in D - "Poe" Subtraction should remove the first instance (left to right) of that combination of letters. So if we had "Banana" and we are subtracting "ana" from it the resulting string would be "Bna" and NOT "Ban Another example if we had "Banana" and we were subtracting "a" from it we would get "Bnana". Note that we will not deal with negative strings so if givenA-E, IfE>A then return A. * (Multiplication) - *, *,

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!