Question: In Java, write a program that asks the user to enter an English sentence, phrase or paragraph, and then test the input for various properties.

In Java, write a program that asks the user to enter an English sentence, phrase or paragraph, and then test the input for various properties. Your program will allow the user to enter a sentence (through a dialog), and will respond by telling the user the answer to the following questions:
Is the input a palindrome?
Is the input an alliteration?
Is the input a lipogram avoiding E?
Is the input a lipogram avoiding S?
Additional requirements: Include palindromes and use at least one loop through the characters. For alliteration, use a Scanner.
(Optional) add an additional feature of your own choosing. Some suggestions include:
Fix your alliteration test so that it works even on sentences where the first word or words is/are three letters or less. You can use arrays with the split() method in the String class (see tips below).
Add a sentinel based loop that allows the user to continue entering sentences to be tested in the same way until the user enters the single word: "quit."
Add some additional statistics about each sentence including the number of words, average word length, and longest word.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!