Question: Write a class called StringCode with the following functions. (Do not change these function names or return types, else tests will fail). public static String

 Write a class called StringCode with the following functions. (Do not

Write a class called StringCode with the following functions. (Do not change these function names or return types, else tests will fail). public static String blowup (String str) Returns a version of the original string as follows: each digit 0-9 that appears in the original string is replaced by that many occurrences of the character to the right of the digit. So the string "a3tx2z" yields "attttxzzz" and "12x" yields "2xxx". A digit not followed by a character (i.e. at the- end of the string) is replaced by nothing. public static int maxRun(String str) Given a string, returns the length of the largest run in the string. A "run" is a series of zero or more adjacent characters that are the same. So the max run of "xxyyyz" is 3. and the max run of "xyz" is 1

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!