Question: In Java. Write a program that creates a helper class called String Helper. This class has methods not already built into strings, but should be
Write a program that creates a helper class called String Helper. This class has methods not already built into strings, but should be because they are super useful. First create a class called String Helper which has the following static methods mesh Strings: This method takes in two strings via parameters, meshes them together, and returns the meshed strings. Meshing alternates each character in the first string with every character in the next string. If there are not enough characters to fully mesh, then the rest will be appended to the end. For instance, if the two strings were "harp" and "fiddle" the returned string will be. replace Vowels with Oodles: This method takes in one string via parameter, and returns the string with every vowel (a, e, i, o, u) replaced by the phrase "oodles". For instance, if the string is "burrito" then the returned string would be "body error Also case does not matter. weight: Much like length returns the number of characters in a string, the weight gives the weight in kilograms. This method takes in a string and returns a double value corresponding to its weight. Everyone knows that a word's weight is determined by each vowel (a, c, i, o. u) counting as 2.5 kilograms and each consonant as 3.4 kilograms. Finally create a class called String Helper Tester This class DOES HAVE a main method Test each method multiple times to determine if they work. Example Dialog: Welcome to the String Helper Tester Meshing harp with fiddle Replacing vowels with oodles in the word burrito Body error The weight of the word taco is 11.8
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
