In this assignment, you will implement a simple class called CustomString. This class represents a more customizable version * of a String, with additional attributes and methods. * For example, the CustomString class has a “reverse” method which returns a new string version of the current string where the * capitalization is reversed (i.e., lowercase to uppercase and uppercase to lowercase) for the alphabetical characters specified * in the given arg. For CustomString “abc, XYZ; 123.”, calling reverse("bcdxyz@3210.") will return "aBC, xyz; 123.". * * The CustomString class also has a “remove” method which returns a new string version of the current string where the alphabetical * characters specified in the given arg, are removed. For CustomString "my lucky numbers are 6, 8, and 19.", calling remove("ra6") * will return "my lucky numbes e 6, 8, nd 19.". * */
In this assignment, you will implement a simple class called CustomString. This class represents a more customizable version
* of a String, with additional attributes and methods.
* For example, the CustomString class has a “reverse” method which returns a new string version of the current string where the
* capitalization is reversed (i.e., lowercase to uppercase and uppercase to lowercase) for the alphabetical characters specified
* in the given arg. For CustomString “abc, XYZ; 123.”, calling reverse("bcdxyz@3210.") will return "aBC, xyz; 123.".
*
* The CustomString class also has a “remove” method which returns a new string version of the current string where the alphabetical
* characters specified in the given arg, are removed. For CustomString "my lucky numbers are 6, 8, and 19.", calling remove("ra6")
* will return "my lucky numbes e 6, 8, nd 19.".
*
*/
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images