Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is work uncertified?

Answered: 1 week ago