
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Write in Java please

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

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

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 5 steps with 4 images

Knowledge Booster
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.Similar questions
- In most compiled programming languages, variables are "typed," meaning that you have to declare them as integers, characters. etc.. Is that the case with JavaScript? Name one pro and one con of variable type declarations.arrow_forwardWrite a program that displays the following pattern: In java * *arrow_forwardPlease answer this Java problem below: What is the good reason you might implement exception handling in your JAVA programs?arrow_forward
- Please help with the following in JAVAarrow_forwardcreate a java code using the conversion methodarrow_forwardimport java.util.Scanner; class Program41 {//PSEUDOCODE //Write a program that prompts the user to enter a full name consisting of three names //first //middle //last // into one String variable //Then use methods of class String to: //print the number of characters in the full name, excluding spaces //print just the middle name and the number of characters in it //print the three initials of the name //print the last name in all lower case //print the full name in the usual alphabetical format (Last, First Middle) and proper case public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("Enter full name:"); String fullName = sc.nextLine(); System.out.println("\nNumber of Charatcers in your name " + fullName + "':" + fullName.replace("","").length()); String[] subNames = fullName.split(" "); System.out.println("\nMiddle Name: " +…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

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)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education