Question: class Powerstring { public: // constructor: initialize str with ini_str passing as a parameter PowerString(string ini str): // return a reversed string. Note that str

 class Powerstring { public: // constructor: initialize str with ini_str passing

class Powerstring { public: // constructor: initialize str with ini_str passing as a parameter PowerString(string ini str): // return a reversed string. Note that str has not been changed string reverse(): // return a palindrome which contains str then followed by // the reverse of str //for example, if str is "abc", it returns "abccba" // Note that str has not been changed string evenPalindrome(): // return a palindrome which contains str, then followed by // the reverse of str, except for the last character of str //for example, if str is "abc", it returns "abcba" // Note that str has not been changed string oddPalindrome (): // displays str, followed by a new line marker, //to the standard output void print(): private: string str: }

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!