Create a method named translateToPigLatin
that receives a String, converts each word in the String to Pig Latin, and returns the new Pig Latinated string. Here's how to translate the English word englishWord into the Pig Latin word pigLatinWord:
"Astahay alay istavay, abybay." - The Piglatinator
Before you turn in your program...
Does your program re-capitalize words properly? (Basic version)
Does your program handle simple punctuation? (Advanced version)
Simple punctuation is defined as any sequence of punctuation marks that appear at the end of a word.
Example: "Hello!!! How are you, Bill?"
Try these Basic test cases:
Hasta la vista baby ➜ Astahay alay istavay abybay
Hey you Do you know how to speak in Pig Latin ➜ Eyhay ouyay Oday ouyay owknay owhay otay eakspay inyay Igpay Atinlay
Try these Advanced test cases:
Hasta la vista, baby! ➜ Astahay alay istavay, abybay!
Hey you! Do you know how to speak in Pig Latin? ➜ Eyhay ouyay! Oday ouyay owknay owhay otay eakspay inyay Igpay Atinlay?
You are encouraged to complete the Advanced version of this lab, but the Basic version is sufficient for full credit.
All files must incude your name and period in the format
PX_LastName_FirstName_Title
You must Sign In to submit to this assignment
Last modified: November 08, 2023
Back to Lab 10.2 Shorthand