Objective:
Develop your own String class
Preparation:
Review chapters 10 and 13 fom Starting Out with C++ by Gaddis.
Programming:
- Name your files LlllFfffLab06.cpp, LlllFfffString.cpp, and LlllFfffString.h where Llll is the first four letters of your last name and Ffff is the first four letters of your first name.
- Create your own String class to represent a string as though the C++ string class didn't exist.. The class should use dynamically allocated memory to store the
actual string data. Provide for both a default constructor and an explicit value constructor
that recieves a c-string for the intial value. Also, provide a destructor to deallocate
the memory used. Provide a set member function to "assign" a new string value to the
object, a member function to print the string, and a member function to return the
size of the string. All string parameters needed by these member functions should
be c-strings.
- Write a driver program to demonstrate the your String class. The driver should demonstrate all specified features of the class. Be sure
to modularize.
- Verify your program works correctly.
- Submit your source code file to
ude.wons@nosneros.htrag. Due at 8:00 am on 11 February.