Question: This is one question. Please complete using C++. Can please create an output file log as well thank you. You are to create your own

 This is one question. Please complete using C++. Can please create

This is one question.

Please complete using C++.

Can please create an output file log as well thank you.

You are to create your own version of a string class named myString. myString will store a string of characters (use dynamic memory ptr to char) Include a reference status variable to indicate any error state (you determine the states/values, such as invalid parameter value provided) You will also need to define the following methods as part of your class: myString( string) - you may have a constructor that takes a string parameter size() - returns how many characters are in the string (empty string is size zero) addStart(myString) adds the string in the input parameter to the front of current string addEnd(myString) - adds the string in the input parameter to the end of the current string partString(startPos, length) returns as myString that portion from startPos for length given. Handle startPos size; startPos = size returns null string| replPartString(myString, startPos) replaces characters starting at startPos with parameter, which may be , or= in size to what is replaced replWholeString (myString) - replaces current string data value with parameter string compareString(myString) - compare current value of string with parameter string. Returns O if strings match, otherwise return character position (NOT index) where mismatch occurs. If parameter is first alphabetically then return is positive, otherwise negative. initString() - resets/initializes string to null string setString(string) assign to myString the parameter string getString() - returns string of data from myString printStringScreen() - prints myString data value to the monitor (value only, nothing else) numericString) - returns Boolean telling if data value is an integer or real (signs, decimal point. etc.), or not alphabeticString0 returns Boolean telling if data value is all alphabetic characters You may use the C++ string class only for user input and the setString and getString methods. Only size from the string library may be used, and only within setString method. Write a main that will test all functionalities of the myString class, displaying the actions both on the screen and to an output file. Main must use a myString method to write the results to the file. Create an output file log of actions (every class method called), which must show action, original value of myString, parameters/results, success/error message. You determine appearance of log file format into columns for readability -- and what the error messages will be

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!