This assignment is to write a Java program to:
prompt the user for a text file name
read words (a word is a sequence of letters) from the file and count the number of times each word appears.
display the words along with the corresponding number of times the words appear
Requirements:
use a JOptionPane to prompt the user for the file name
store the words in an ArrayList<String> as Strings
store the counts in another ArrayList<Integer> as Integers
if a word is at a position in the words ArrayList<String> then the number of times that word appeared is in the same position the the counts ArrayList<Integer>
display the results on a JTextArea in a JScrollPane in a JOptionPane
align the words and counts to start in the same column
Do the WordsExercise to get hints for the assignment.
This assignment is due on Thursday May 25th at the beginning of class. At that time there will be a 10 minute quiz on the assignment. Hand in a printout of the source file.