Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need to write three methods of the following bullet points below. my professor

ID: 3810775 • Letter: I

Question

I need to write three methods of the following bullet points below. my professor attached a text file from a book and he asked us to rewrite that text using these three bullet points in methods. Since this is java 1 id like the methods to be as simple as possible.

>>you can pick any of your text file of choice since its a method; attaching that wouldn't be nessassary since i just want to see how its done.

but make sure the methods below work all throughout the given text.

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").

3) If a word ends in 'a', append an 'r'. For example "tuna" becomes "tunar", "Cuba" becomes "Cubar", and "idea" becomes "idear". (Don't change this to an 'h' based on the previous rule; leave it as an 'r'.) Do not apply this rule to the word "a", so "a tuna" should become "a tunar", not "ar tunar".

Explanation / Answer

Given below is a relatively simple Java program which defines three replacement methods (replacer1, replacer2, replacer3) which perform character replacement as per given problem statement.

Sample Input File (e.g. test.txt):

Sample Output:

deeyah deeyah. deeyah; deeyah,
chaiyah chaiyah. chaiyah; chaiyah,
veneehs veneehs. veneehs; veneehs,
doowah doowah. doowah; doowah,
doohs doohs. doohs; doohs,
a tunar a tunar. a tunar; a tunar,

File: ReplacerApp.java