Write a program called Words that: prints your name followed by three asterisks; reads the words in a text file into a String array, where each array entry contains a word; prints the number of words in the file; counts and prints the number of five-letter words; prints all of the five-letter words starting with a vowel (that is, 'a', 'e', 'i', 'o', or 'u'); finds and prints the alphabetically first five-letter word and the alphabetically last five-letter word. it was the best of times it was the worst of times it was the age of wisdom it was the age of foolishness it was the epoch of belief it was the epoch of incredulity it was the season of light it was the season of darkness it was the spring of hope it was the winter of despair we had everything before us we had nothing before us we were all going direct to heaven we were all going direct the other wayin short the period was so far like the present period that some of its noisiest authorities insisted on its being received for good or for evil in the superlative degree of comparison only there were a king with a large jaw and a queen with a plain face on the throne of england there were a king with a large jaw and a queen with a fair face on the throne of france in both countries it was clearer than crystal to the lords of the state preserves of loaves and fishes that things in general were settled for ever
Write a program called Words that:
- prints your name followed by three asterisks;
- reads the words in a text file into a String array, where each array entry contains a word;
- prints the number of words in the file;
- counts and prints the number of five-letter words;
- prints all of the five-letter words starting with a vowel (that is, 'a', 'e', 'i', 'o', or 'u');
- finds and prints the alphabetically first five-letter word and the alphabetically last five-letter word.
it was the best of times it was the worst of times
it was the age of wisdom it was the age of foolishness
it was the epoch of belief it was the epoch of incredulity
it was the season of light it was the season of darkness
it was the spring of hope it was the winter of despair
we had everything before us we had nothing before us
we were all going direct to heaven we were all going direct
the other wayin short the period was so far like the present
period that some of its noisiest authorities insisted on its
being received for good or for evil in the superlative degree
of comparison only
there were a king with a large jaw and a queen with a plain face
on the throne of england there were a king with a large jaw and
a queen with a fair face on the throne of france in both
countries it was clearer than crystal to the lords of the state
preserves of loaves and fishes that things in general were
settled for ever
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images