Explore BrainMass
Share

Java Application PigLation Translator

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

I need help with this:

Writing an application that translates an English word to Pig Latin. The application should have methods for getting user input and doing the translation. The application should first ask the user for the word to be translated and then display the translated word. It should continue until the user enters "quit". The application should also trap for any input that is more than one word (it contains a space) and allow the user to re-enter until they give a single word. The simplified Pig Latin translation algorithm we will use is to append 'ay' to the end of the word and strip off all consonants (not vowels: a,e,i,o,u,y) from the beginning of the word. For example: "good" becomes "ooday", "yellow" becomes "yelloway". I have been given a pig latin translation application and are required to develop the PigLatinTranslator class. Notice that not all methods will be used in actual application, however we want to always design robust classes. PigLatinTranslator UML is as follows:

PigLationTranslator
-----------------------
- _convertedWord : String
-----------------------
+ PigLatinTranslator()
+ translate(englishWord : String) : String
+ getConvertedWord() : String

I also need to know what code was used and the corrections that were made in order to get the code to work.

The Pig Latin Translator Application code is uploaded.

Thanks!

© BrainMass Inc. brainmass.com October 16, 2018, 11:18 pm ad1c9bdddf
https://brainmass.com/computer-science/java/java-application-piglation-translator-253588

Attachments

Solution Preview

Hello student,
I have attached the completed solution.

If ...

Solution Summary

A Java application for PigLation translator is examined.

$2.19