Question: Help with this C++ code please, I'm using Visual Studio Project Title: String Class implementation. DO NOT USEINCLUDE string type (e g #include Objective: Learning

Help with this C++ code please, I'm using Visual Studio

Help with this C++ code please, I'm using Visual Studio Project Title:String Class implementation. DO NOT USEINCLUDE string type (e g #include Objective:

Project Title: String Class implementation. DO NOT USEINCLUDE string type (e g #include Objective: Learning design and use of object oriented programming, operator overloading, constructors (copy constructor, default constructor etc.), destructors, 'this pointer, friendship relation, and static variables. Input: String or strings (e.g. s1+s2 will return concatenation of strings sl and s2) Output: Required operations' outputs e.g. s1>s2 returns true or false, s1[2] returns third char in string s1, s1Length0 returns length of s1 etc Project Description: You are required to create your own Strin class (Note: String class is different than built in string class) like string type in C++. This class should include following operations (10 Points) Separate specifications from implementation. Keep header file and class implementation in separate files * (20 Points) Can initialize created object with a given string or given instance of the same class (use copy constructor (10 Points) Dynamically allocates memory for a given string (e.g. String s("Joe"); in this case allocates 3 memory spaces for String class instanc * (10Points) Returns string length if it is requested (e.g. sLengthO) (10 Points) Clears dynamically allocated memory for String object while destructing (do it in destructor) * (20 Points) Checks boundaries (e.g. if String s size is 10, s[11]- 'A'; will display error message on screen) (20 Points) In public section of the String class only include interfaces. All other variables and functions must be in private section (30 Points) Overloads+ operator so that two string can be concatenated. (e.g. String sLs2,s3s3 = s1+s2) . when only have sl+s2; concatenated string will be included in sl (30 Points) Overloads (30 Points) Compares two given objects (e.g. String ab a>b or a operators (30 Points) Copies one object to another (e.g. a=b or a=b=c) (overload-operator for this purpose) . (20 Points) When required returns number of objects created so far. (e.g. String obou count(). Obicount ) returns total number of non-empty String objects) . (30 Points) Can get input from the steam class instance (e.g. cins;). Make it friend of the String class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!