Question: Write a java program that behaves as follows: Read a passage from a file. Convert the text to its equivalent in a Southie accent. Write

Write a java program that behaves as follows:

Read a passage from a file.

Convert the text to its equivalent in a Southie accent.

Write the converted text to the output file.

Basic Rules

-If there's an 'r' following a vowel ('a', 'e', i', 'o', or 'u'), replace 'r' with 'h'. For example, "I left my car keys by the harbor" becomes "I left my cah keys by the hahboh."

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

-Replace the word "very" with the word "wicked". So "very hard" becomes "wicked hahd".

Exceptions

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

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

Each rule should be broken into it's own method, and should be written in the most simple java basics as possible.

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!