Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(this assignment is using Eclipse.)(prog Java) Create a program that will take in an English sentence and translate it into Pig Latin . Read the

(this assignment is using Eclipse.)(prog Java) Create a program that will take in an English sentence and translate it into Pig Latin . Read the explanation in Wikipedia of how to translate English words to Pig Latin. If the word starts with a consonant: the first letter is moved to the end of the word then ay is added to the end. If the word starts with sh, ch, or th; move those 2 letters to the end of the word, then add ay to the end. If the word starts with a vowel: just add way to the end of the word. The translation must be done in a function. The original word will be passed to this function and return the translated word back to the function call. Also add a choice for the user to decide if they want to translate another phrase after the current phrase has been completed and displayed to the user. To easily know when you have the last word, instruct the user to add punctuation at the end of the sentence (period, exclamation points, or question mark). Therefore, you can check the last character of the word to see if it is a . or ! or ? and know if it is the last word of the sentence. Note: if you are going to put that last character in a variable, it will be a char type since it is one character. Remove the punctuation from the last word before converting it to pig latin.

Notes: Be sure to have try-catches in your code.

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

Database Systems For Advanced Applications 27th International Conference Dasfaa 2022 Virtual Event April 11 14 2022 Proceedings Part 2 Lncs 13246

Authors: Arnab Bhattacharya ,Janice Lee Mong Li ,Divyakant Agrawal ,P. Krishna Reddy ,Mukesh Mohania ,Anirban Mondal ,Vikram Goyal ,Rage Uday Kiran

1st Edition

ISBN: 3031001257, 978-3031001253

More Books

Students also viewed these Databases questions

Question

Prepare a short profile of victor marie hugo ?

Answered: 1 week ago

Question

Prepare a short profile of Henry words worth Longfellow?

Answered: 1 week ago

Question

What is RAM as far as telecommunication is concerned?

Answered: 1 week ago

Question

Question 1: What is reproductive system? Question 2: What is Semen?

Answered: 1 week ago