Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Lab Instructions You are to create your own version of a string class named myString. myString will store a string of characters (use dynamic

C++ Lab Instructions

You are to create your own version of a string class named myString.

myString will store a string of characters (use dynamic memory).

Include a reference status variable for errors.

You will also need to supply the following methods as part of your class:

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 < 0, startPos = size returns null string, handle startPos > size)

replPartString(myString, startPos) replaces characters starting at startPos with input string

replWholeString (myString) replaces current string data value with input parameter string

compareString(myString) compare current value of string with input parameter string

initString() resets/initializes string to null string

setString(string) assign string to myString data value

getString() returns string of data from myString data value

printStringScreen() prints myString data value to the monitor

numericString() returns Boolean telling if data value is either integer or real (signs, decimal point. etc.)

alphabeticString() returns Boolean telling if data value is all alphabetic characters

You may use the C++ string class only for screen input and the setString & getString methods.

Write a main that will test all of 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, which must show action, original value of myString, parameters/results, success/error message.

You determine format and error messages format into columns for readability

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions

Question

LO4 Identify a system for controlling absenteeism.

Answered: 1 week ago