Cmpp307 Assignment 5 Oil Wells CPRG 311 ASSIGNMENT 3: BINARY SEARCH TREES AND SERIALIZATION. PAGE 1 ASSIGNMENT THREE: Binary Search Trees and Serialization Description You will be provided an ADT for...

1 answer below »
Please follow all instructions under CPRG311_Ass3


Cmpp307 Assignment 5 Oil Wells CPRG 311 ASSIGNMENT 3: BINARY SEARCH TREES AND SERIALIZATION. PAGE 1 ASSIGNMENT THREE: Binary Search Trees and Serialization Description You will be provided an ADT for a Binary Search Tree (BSTreeADT.java) to be implemented as a Binary Search Tree (BST). 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 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. Notes - This is your third assignment and is worth 5.7% of your final grade in this course. - You are required to complete this assignment with your assigned group. - No late assignments will be accepted. - Below you will find the specifications for your application, along with some hints on how to proceed. - Read the specifications very carefully. If you are uncertain about any of the requirements, discuss it with your instructor. Specifications 1. Write a reference-based implementation (BSTree.java, BSTreeNode.java) using the instructor- provided BSTreeADT.java and Iterator.java interfaces. 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 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 run the program via the command line as follows: CPRG 311 ASSIGNMENT 3: BINARY SEARCH TREES AND SERIALIZATION. PAGE 2 java -jar WordTracker.jar -pf/-pl/-po [-f ] a) is the path and filename of the text file to be processed by the WordTracker program. b) 3 mutually exclusive options at command line: - -pf to print in alphabetic order all words along with the corresponding list of files in which the words occur. - -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. - -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. c) Optional argument to redirect of the report in the previous step to the path and filename specified in
Answered 16 days AfterApr 17, 2022

Answer To: Cmpp307 Assignment 5 Oil Wells CPRG 311 ASSIGNMENT 3: BINARY SEARCH TREES AND SERIALIZATION. PAGE 1...

Manikandan answered on Apr 20 2022
88 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here