Question: Igpay Atinlay Write a Java program that translates sentences into Pig Latin. The rules for translating a word to Pig Latin are: 1. For words

Igpay Atinlay

Write a Java program that translates sentences into Pig Latin.

The rules for translating a word to Pig Latin are:

1. For words starting with a consonant:

ay

strawberry awberrystray

2. For words starting with a vowel:

way

olive oliveway

Your program should accept and translate sentences until the user enters the word quit as a sentence. The sentences may contain punctuation.

Here is a sample run (user input shown in bold):

Enter a sentence or quit: The strength of the football team is their defense!

Translation: eThay engthstray ofway ethay ootballfay eamtay isway eirthay efenseday!

Enter a sentence or quit: Where are the good, spicy, tasty tacos found?

Translation: ereWhay areway ethay oodgay, icyspay, astytay acostay oundfay?

Enter a sentence or quit: quit

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!