C++ MyString Class Programming Project

C++ MyString Class Programming Project

Object-Oriented Programming is a power tool when combined with strings in C++. It allows creating string objects that have flexible sizes, intuitive operator syntax (through operator overloads), and other useful features.

You’ll create a MyString class that stores a (null-terminated) char* and a length and implements all of the member functions below. Submit your completed source (.cpp) file.

  • Default constructor:empty string
  • const char* constructor:initializes data members appropriately
  • Copy constructor:prints “Copy constructor” and endl in addition to making a copy
  • Move constructor:prints “Move constructor” and endl in addition to moving data
  • Copy assignment operator:prints “Copy assignment” and endl in addition to making a copy
  • Move assignment operator:prints “Move assignment” and endl in addition to moving data
  • Destructor
  • Array index overload (e.g., str[2]):should be able to read or write the character in this position.Don’t test for out-of-bounds indices.
  • Concatenation (+) operator:returns the concatenation of this string with the other.Does not modify either object.
  • Print function that works with cout

Both header and a main file are provided in a zip

"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.


Discount Code: CIPD30



Click ORDER NOW..

order custom paper