Question: 1. Write a class for string manipulation containing 4 methods: 1.1. reverseString: given an input string, returns the reverse of it (i.e., ABCD -> DCBA).
1. Write a class for string manipulation containing 4 methods:
1.1. reverseString: given an input string, returns the reverse of it (i.e., ABCD -> DCBA).
1.2. invertString: given an input string, returns the inverse of it (i.e., aBcD -> AbCd).
1.3. removeNumbers: given an input string, removes any digits in it (i.e., ab3cd -> abcd).
1.4. removeSpecial: given an input string, removes any special characters in it (i.e., ab! cd3 -> abcd3). *hint: special characters are any non-numeric characters not in intervals [a:z], [A->Z] and [0-9].
2. Using the class created above, write a program that determines if an input sentence is a palindrome, for example, "A man, a plan, a canal, Panama!" You ignore the punctuation marks, blanks, and case of the letters. Repeat the operation until an empty string is entered.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
