Question: QUESTION 2 Given the class definition below, implement default constructor, copy constructor, destructor, swap and assignment for the String class 1/CLASS INV: s[length()]==0 && stringsize-1

QUESTION 2 Given the class definition below, implement default constructor, copy constructor, destructor, swap and assignment for the String class 1/CLASS INV: s[length()]==0 && stringsize-1 == capacity () && length() == capacity () class String [ public: String (); String (const String&); -String 0); String&* operator= (String); void swap (String&); private: char *s; int stringSize
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
