Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

More Books

Students also viewed these Databases questions

Question

7. It is advisable to do favors for people whenever possible.

Answered: 1 week ago