Question: Step 1 Implement the following class header file ( i . e . write the cpp file ) . You may add any other properties
Step
Implement the following class header file ie write the cpp file
You may add any other properties andor methods that you need. You might want to check with me before adding them just to make sure you're on the right track.
Write a main function that will test all the different methods. Make sure your main function is easy to read and understand. I recommend you use regions and procedures to break up the logic. You can easily comment out a call to previously made procedures so you can test only the current procedure that you are working on
You may use any string functions you want eg strlen, strstr etc
You may not use the builtin String class.
In addition to the methods listed below, overload the following operators with all reasonable parameters ie char, const char CSuperString &:
NONE of the class methods other than the constructors or the assignment operators and should change mpstrSuperString.
You must assign the value back to the class instance to make it permanent. For example:
ssBuffer ssBuffer.ToUpperCase;
Minus one letter grade for any memory leak. Minus two letter grades if there are a lot of memory leaks.
Minus one letter grade if replace with substrings doesn't work correctly.
Minus one letter grade if self assignment doesnt work correctly eg ssBuffer ssBuffer.ToUpperCase;
Minus one letter grade if you don't solve the double call problem. The following should display correctly:
printf "Left: s Left: s
ssBuffer.Left ssBuffer.Left;
Splitting the code up into two lines is not the solution.
Add the following procedure to your tests and make sure it executes without errors.
void MuahahahTest
CSuperString ssTest;
cout Muahahah Test #: ssTest endl;
Add the following procedure to your tests and make sure it executes without errors.
void MuahahahTest
CSuperString ssTest "I Love Star Wars and I Love Star Trek";
ssTest ssTest.Replace "Love","Really Love Love" ;
cout Muahahah Test #: ssTest endl;
I recommend you start with just the following methods, get those working and code, test and run additional methods one at a time: constructor, initialize, assignment operator, deep copy, to string and print.
Next, Id recommend you get all the other constructors done.
After that, Id recommend you get all the to methods done.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
