Sentenceanalyzer | Computer Science homework help

Java Application 1 –  Latin Converter

Pi Latin is a constructed language where English words are altered according to a simple set of rules.
The objective is to conceal the meaning of the words from others not familiar with the rules. The reference to Latin is a deliberate misnomer, as it is simply a form of jargon, used only for its English connotations as a “strange and foreign-sounding language.”

Don't use plagiarized sources. Get Your Custom Essay on
Need an answer from similar question? You have just landed to the most confidential, trustful essay writing service to order the paper from.
Just from $11/Page
Order Now

The rules for converting from English to Pi Latin can be elaborate, but we will adopt the following rules which are simpler:

• For words that begin with vowels (a, e, i, o, u), the letters “yay” are added to the end of the word.

• For words that begin with consonants, the initial consonant is moved to the end of the word, and “ay” is added.

Here are some examples:

English Word Pi Latin

egg eggyay
yellow ellowyay
happy appyhay
duck uckday
glove lovegay
pi igpay
banana ananbay
trash rashtay
ugly uglyyay

Create a java application to convert English words to pi Latin using the above rules.

Put the code in a loop to continue prompting for more words to convert.

Here is an example of how the program might appear

Name the Java Class: PiLatinConverter

Java Application 2 – Sentence Analyzer

Create a java application to read a line from the keyboard and display the following statistics.

Number of characters entered in the line
Number of letters in the line
Number of Digits in the line
Number of spaces in the line
Number of uppercase letters in the line
Number of lowercase letters in the line

Here is an example of how the program might appear:

Name the Java Class: SentenceAnalyzer