Problem Description

To complete the implementation of the mystring class, the declaration of which is provided in mystring.h file in Lab 5. The mystring class mimics the behavior of C++ string class.

To find out the behavior of each method to be implemented, we are encour- aged to experiment with the corresponding method in C++ string class or to ask question in class. You may be allowed to use c-style string library func- tions, such as strcpy, in your implementation. However, you should not use C++ string! The reason is that such a class is assumed to be not available and we are going to implement it. Vector should not be used either.

Purpose

Understand class, member function and field, constructor, operator overloading as member functions or basic functions, memory management, array, and string class. To gain experience and understanding related to how a complex and useful class such as string may be designed and implemented using basic c++ language features, data structures, and algorithms.

Design

The design is provided to us in the two files: mystring.h and mystring.cpp in Lab 5.

Implementation

Implement the member functions, operators, as well as non-member operators, declared in mystring.h. The implementation goes in mystrng.cpp.

Test and evaluation

In the main program, demonstrate the functionalities of the implemented func- tions or operators to be similar to that of string class.

Report and documentation

A short report about things observed and things learned and understood. The report should also describe the test cases used in the main program and the reasons for each test case selected. Properly document and indent the source code. The source code must include the author name and as well as a synopsis of the file.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.