Project 3 - MyString Class

Due Date:

Objective

This assignment will give you practice working with c-strings, algorithm design, dynamic memory allocation, overloading various operators, and copy constructor / assignment operator.

Task

You will provide an implementation for the MyString class that stores and performs various operations with a string. In addition, you will provide a driver that tests each function in said implementation. A complete header file, a skeleton implementation file and an empty driver file have been provided for you :
Students should not change MyString.h in any way. Submissions will be tested using the MyString.h above.

The skeleton implementation file contains detailed descriptions of each of the functions. Students should implement each function as described in the comments of MyString.cpp. Students may use functions in the c++ standard libraries (most, if not all, functions needed should be referenced in the function descriptions) in their implementations but may NOT use the String class.

In addition to the completed implementation file, students must also turn in a driver file which tests the complete functionality of their implementation. Your tests should be simple but should also prove the correctness of your solution. The driver file should be well commented indicating where each feature is tested and the expected output.

Approach

Although this project is a bit longer than previous projects, the approach is very well defined. Here are the steps to successfully completing the MyString project:
  1. Look over MyString.h to get an overview of what the MyString class looks like. Don't worry about the tokenization and substring generation member data yet.
  2. Review the function descriptions in MyString.cpp. It is not necessary to know how to implement each function yet, just get an idea of the input/output parameters and the general purpose of the function.
  3. Start filling in the function definitions:

General Requirements:

For this project, submit the following files via PyGrader:
 
  MyString.cpp
  driver.cpp