Question: I need help writing this for Java language Create a WordCount class that uses the AVL tree class to count words from a file. The
Create a WordCount class that uses the AVL tree class to count words from a file. The trick here is that you should not have duplicate words in the list. Basically when a word is read from the file the tree should be checked to see if the word already exists in the tree. If it does exists the count for the word should simply be incremented, If it does not exist then the node should be added to the tree and the count for that particular word should be set to 1. You should have functionality that will print each word in the tree and how many times it appears. This is not simply reading a list of words from a file. Your WordCount class should read any text from the file and count the words in it. This is going to require a bit of parsing on your part. Please disgard punctuation characters like comma and period
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
