Read the file into a binary search tree


Given a text file of words, the assignment is to read the file into a binary search tree and then answer questions. You can work individually or in pair.
The Input

The files are in mixed case. For the purposes of this assignment, a word is any sequence of lower or upper case letters; digits and other characters do not count. Convert words to lower case before you process them.

The Program

Ask the user for a file name. Read the file into a binary search tree. Then ask the user what to do next. The options are:

1. get help

2. quit

3. print the number of distinct words,

4. print the number of occurrences of a particular word,

5. print all words that appear more than a certain number of times, alphabetically,

6. print all words, with the frequency of occurrence, that occur alphabetically on or after 

some word1 and on or before some word2, and

7. print out a list of line numbers on which some word occurs.

You should keep asking until the user quits. All the tree routines must be placed in a generic class. All routines may accept only a tree and a word, where appropriate.You should also use a generic queue class, which must use a linked list implementation. Efficiently implement toString for the standard queue class (use a StringBuffer). 

problems

 To select the best algorithm and/or data structure when solving a given programming 
problem
 To analyze time and space required for the execution of a program, as well as the 

correctness of a program

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Read the file into a binary search tree
Reference No:- TGS092676

Expected delivery within 24 Hours