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:
strawberry awberrystray
2. For words starting with a vowel:
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
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