Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello. Can you help me out to make the code? This is my instruction. Q: I want you to make 2 JUnit Tests for BSTree

Hello. Can you help me out to make the code? This is my instruction.

Q: I want you to make 2 JUnit Tests for BSTree and BSTreeNode. (called BSTreeNodeTests and BSTreeTests) -> should use JUnit4 !

I will add all the given file or codes in the below. Thank you!

image text in transcribed
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 modes 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: PAGE 1 CPRG 311 ASSIGNMENT 3: BINARY SEARCH TREES AND SERIALIZATION. java -jar WordTracker . jar -pf/-pl/-po [of ) 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions