Binary search tree, JAVA Programming

You will be required to create an ADT for a Binary Search Tree (BSTInterface.java). The interface will be implemented as a Binary Search Tree (BST) using a reference based format. The implementation of the BST will be used in an application called WordTracker that reads text files and collects and stores all the unique words it finds in those files. The BST will be able to store information from multiple text files. It will also keep track of each occurrence of a word in a file and the line on which it was found in that file. This information will be stored in a double-linked list for each word object stored in the BST. The program will also produce output, specified by the user at command line, to generate reports using a variety of iterators built into the BST.

Specifications

1. Write a binary search tree ADT interface (BSTInterface.java) and its reference based implementation (BSTReferencedBased.java, BSTNode.java). JUnit should be used to test the implementation of the Binary Search Tree.

2. Write a cross-reference program (WordTracker.java), which constructs a binary search tree with all words included from a text file (supplied at the command line) and records the line numbers on which these words were used. The line numbers should be stored on linked lists associated with the file names, which in turn are associated with the nodes of the tree.

3. Using Java serialization techniques, store the tree in a binary file (repository.ser). Make sure you insert the class version UID to ensure the backward compatibility with your repository should the class specification change with future enhancements.

4. Every time the program executes, it should check if the binary file (repository.ser) exists, and if so, restores the words tree. The results of the scanning the next file are to be inserted in the appropriate nodes of the tree. Therefore, repository.ser will contain all words occurred in all files scanned with the meta information about those word locations.

5. The user should be able to specify 3 mutually exclusive options:

a) -pf to print in alphabetic order all words along with the corresponding list of files in which the words occur

b) -pl to print in alphabetic order all words along with the corresponding list of files and numbers of the lines in which the word occur

c) -po to print in alphabetic order all words along with the corresponding list of files, numbers of the lines in which the word occur and the frequency of occurrence of the words.

6. The user should be able to redirect the report in part 5 to a file with an additional option -f filename.

Posted Date: 2/26/2013 4:30:02 AM | Location : United States







Related Discussions:- Binary search tree, Assignment Help, Ask Question on Binary search tree, Get Answer, Expert's Help, Binary search tree Discussions

Write discussion on Binary search tree
Your posts are moderated
Related Questions
Luminous Jewels - The Polishing Game Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various lum

I need Crime Management Project Description: It is a web based project build in Oracle(back end) and J2EE(front end)  for peoples so they will register complaints online.

How can I connect my java application with xampp

Describe about basic java programming language? 1. Study the Java programming language: its syntax, patterns, idioms, and styles. 2. Become comfortable along with object orien

Don''t know how to write this, can anyone help me? http://wikisend.com/download/660980/Moving Blobs.zip

Why Processing An Unknown Number Of Parameters ? Most of the time you have a fairly high-quality idea of what parameters will and won't be passed to your applet. Therefore som

You are to write a program name arrayScaling.java that will randomly generate 5000 integer number raging from 1 - 49 and place them in an array. 1.  The program will scale thi

Explain traversing through a collector using Iterator. Ans. We can access each element in Collection by using Iterators regardless of how they are organized in collector. Ite

I need a DCS (Source code and JAR) to process packets from a cheap chinese GPS TK110, the unit is already communicating with the server but is not parsing. So I need someone with e

How to Begin a Variable Name with a Number? If you need to starts a variable name along with a digit, prefix the name you'd like to have (e.g. 8ball) along with an underscore,