Question: please use the c++, finish the code CS 23001 Spring 2017 Page 2 of 5 M. Decker 4. (20pts) Given the class definition below, implement

please use the c++, finish the code

please use the c++, finish the code CS 23001 Spring 2017 Page

CS 23001 Spring 2017 Page 2 of 5 M. Decker 4. (20pts) Given the class definition below, implement the three methods: string (const char (constructs a new string with the value of a character array), length (returns the number of characters in the string) and operator+ (returns the concatenation of two strings). You can only use the provided methods and cannot use any built in functions or libraries. The class invariant must be maintained (null terminating character array). constint CAP = 100 ; /CLASS INV: str[length () 1 == 0 class string { private: char str[CAP]; public : String () { str[0] = 0; } string (const char[1); 1'A) Need to implement int length () const ; I/B) Need to implement string operator+ (const stringE) const; /C) Need to implement

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!