Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA: The Swedish Chef is a puppet character from the Muppet Show. He spoke in his own language. The language is a combination of English,

JAVA: The Swedish Chef is a puppet character from the Muppet Show. He spoke in his own language. The language is a combination of English, mock-Swedish and nonsense. Your task is to create an English to Chef translator. The language rules in priority order are as follows:
Replace all occurrences of “AN” with “UN”.
Replace all occurrences of “AU” with “OO”.
Replace all occurrences of “A” not at the end of a word with “E”.
Replace all occurrences of “OW” with “OO”.
Replace all occurrences of “O” with “U”.
Replace the first occurrence of “I” other than at the start of a word with “EE”.
Replace all occurrences of “EN” at the end of a word with “EE”.
Replace all occurrences of “E” at the end of a word with “E-A”.
Replace all occurrences of “E” at the start of a word with “I”.
Replace all occurrences of “U” with “OO”.

INPUT: There will be 5 input lines. Each line will contain one word.

OUTPUT: For each input line, print the Swedish Chef translation of that line.

SAMPLE INPUT SAMPLE OUTPUT

1. ANSWER 1. UNSWER
2. INPUT 2. INPOOT
3. AUTHOR 3. OOTHUR
4. ENTICE 4. INTEECE-A
5. CHAIRMEN 5. CHEEERMEE

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

Entrepreneurship

Authors: Andrew Zacharakis, William D Bygrave

5th Edition

1119563097, 9781119563099

More Books

Students also viewed these Databases questions

Question

If M = 7, s = 2, and X = 9.5, what is z?

Answered: 1 week ago

Question

Is the timing right to launch your venture?

Answered: 1 week ago