First create a class called StringHelper which has the following static methods meshStrings: This method takes in two strings as parameters, meshes them together, and returns the meshed strings. Meshing alternates the 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 "hfairdpdle". ● replace Vowels WithOodle: This method takes in one string as a parameter, and returns the string with every vowel (a,e,i,o,u) replaced by the phrase "oodle". For instance if the string is "burrito" then the returned string would be "boodlerroodletoodle". 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,e,i,o,u) counting as 2.5 kilograms and each consonant as 3.4 kilograms. Finally create a class called StringHelperTester ● ● ● O O This class DOES HAVE a main method. Test each method multiple times to determine if they work.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Write in Java please
Sample Output:
Welcome to the String Helper Tester!
Enter any two words:
harp fiddle
Meshing harp with fiddle
hfairdpdle
Enter a word:
burrito
Replacing vowels with oodle in the word burrito
Boodlerroodletoodle
Enter a word to determine its weight:
taco
The weight of the word taco is
11.8
Transcribed Image Text:Sample Output: Welcome to the String Helper Tester! Enter any two words: harp fiddle Meshing harp with fiddle hfairdpdle Enter a word: burrito Replacing vowels with oodle in the word burrito Boodlerroodletoodle Enter a word to determine its weight: taco The weight of the word taco is 11.8
Task:
Write a Java program that creates a helper class called StringHelper. This class has methods not already
built into strings, but should be because they are super useful.
First create a class called StringHelper which has the following static methods
mesh Strings: This method takes in two strings as parameters, meshes them together, and returns
the meshed strings. Meshing alternates the 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
"hfairdpdle".
●
replace Vowels WithOodle: This method takes in one string as a parameter, and returns the string
with every vowel (a,e,i,o,u) replaced by the phrase "oodle". For instance if the string is "burrito"
then the returned string would be "boodlerroodletoodle". 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,e,i,o,u) counting as 2.5 kilograms and
each consonant as 3.4 kilograms.
Finally create a class called StringHelperTester
O
This class DOES HAVE a main method
Test each method multiple times to determine if they work.
Transcribed Image Text:Task: Write a Java program that creates a helper class called StringHelper. This class has methods not already built into strings, but should be because they are super useful. First create a class called StringHelper which has the following static methods mesh Strings: This method takes in two strings as parameters, meshes them together, and returns the meshed strings. Meshing alternates the 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 "hfairdpdle". ● replace Vowels WithOodle: This method takes in one string as a parameter, and returns the string with every vowel (a,e,i,o,u) replaced by the phrase "oodle". For instance if the string is "burrito" then the returned string would be "boodlerroodletoodle". 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,e,i,o,u) counting as 2.5 kilograms and each consonant as 3.4 kilograms. Finally create a class called StringHelperTester O This class DOES HAVE a main method Test each method multiple times to determine if they work.
Expert Solution
steps

Step by step

Solved in 5 steps with 4 images

Blurred answer
Knowledge Booster
Methods of StringBuilder class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education