Question: write a simple java method that would replace a string . For example there's an 'r' following a vowel ('a', 'e', i', 'o', or 'u'),

write a simple java method that would replace a string. For example there's an 'r' following a vowel ('a', 'e', i', 'o', or 'u'), replace 'r' with 'h'. ( "I left my car keys by the harbor" becomes "I left my cah keys by the hahboh.")

write a method in java that would

a) Append an r to the word that ends in A.

b) replace a word with another word. for example "very" with the word "wicked".

Part two.

write a method:

1) If 'r' is at the end of a word and is preceded by "ee" or 'i' replace 'r' with "yah" instead of 'h'. For example, "deer" becomes "deeyah" instead of "deeh", but "veneers" still becomes "veneehs".

2.If 'r' is at the end of a word and is preceded by "oo", replace 'r' with "wah". For example, "door" becomes "doowah" instead of "dooh" (but "doors" still becomes "doohs").

.

So I'm just asking for these methods in java (try to make them easy to understand so i can base my methods off of these) appreciate the help.

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!