Binary Search Trees in JAVA
In this problem, you will build two data structures necessaryfor analyzing frequency words appearing in a text. The userinterface (which you should not modify) isprovided for you in TextAnalyzerConsole.java andTextAnalyzer.java (read through them to understandwhat’s going on).
We will perform the analysis as follows: first, maintain abinary search tree that counts the number of occurrences of eachword. The tree has words as keys and integers (number ofoccurrences) as values. Read the text one word at a time, and foreach word, find it in the tree and increment its counter if itexists, or insert it if it doesn’t.
Once
OR
OR