Question
Because of the Swedish Chefs strong accent, Kermit and the other Muppets have a very difficult time understanding him. Write a Java program that converts
Because of the Swedish Chefs strong accent, Kermit and the other Muppets have a very difficult time understanding him. Write a Java program that converts English to Swedish-accented English. Do this by replacing substrings in sentences with other substrings. In the table below, the left column shows the original English substring and the right column shows what it should be converted into (ignore all quotation marks). Note when applying substitutions, you should scan the input line from left to right trying the rules in the table from top to bottom at each character of the input line. Anything that does not match one of these rules should be left alone in the output. Furthermore, make sure that you neither apply a rule to text that is the output from the application of another rule nor overlap matching substrings. For example, "ue" should generate "oo" and not "ooey". Input from the keyboard the multiple lines of text to translate. Output will be the Swedish-accented English translation of each line of the input.
Refer to the sample output below.
Sample Run:
Enter the text: The judges think you will find the problem set both fun and challenging. We hope you actually do.
Translation: Der judges dink yoo vill findy der problem set bod fun und challenging. Vey hopey yoo actually do.
Name the program: SwedishChefXX.java, where XX are your initials.
aii yyyy" yyrr 00: " ddeeeessii
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started