Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help building my Unbalanced Search Tree class and being able to implement it with my other SearchClass, EngineClass, StringClass , KeyValuePairClass, and EasyReaderClass

I need help building my Unbalanced Search Tree class and being able to implement it with my other SearchClass, EngineClass, StringClass , KeyValuePairClass, and EasyReaderClass ,
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
This is part of the Engine Class
image text in transcribed
image text in transcribed
image text in transcribed
KeyValuePair class
image text in transcribed
Search class
image text in transcribed
image text in transcribed
image text in transcribed
String Class
image text in transcribed
image text in transcribed
Easy Reader Class
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
In this project you will be implementing a very basic search engine. The program begins by parsing a collection of text files. Then the user can give single-word queries, and the program returns the names of the files that contain the query word. The "front-end", which handles all the file 1/0 and parsing, is written for you. Your job is to implement the "back-end" data structures. The back-end is a Dictionary ADT that maps each word to a list of files containing that word. A quick and dirty implementation based on an unsorted array is included. You will add the following implementations of the Dictionary ADT I. an unbalanced binary search tree 2.an AVL tree 3.a splay tree After you implement them, you will collect data on the performance of these three kinds of trees. As in Project 2, you can work in groups of 2 or 3. If you decide to work alone on the project (which is not recommended) you need to do only 1. and 2. (unbalanced binary search tree and AVL tree). As with all the previous projects submit a status.txt file where list the names of all the group members and the status of the project. Java Code Download the skeleton code from the Files/Project 3 To compile the provided code, run: javac Search.java -Xlint When executing search, the first argument to the program is the data structure to use. This can be -array, -unbalTree, -avlTree, or-splayTree. You can also use-testArray, -testSplayTree, -testAvlTree, -testUnbalTree to run the test functions in the various classes. Note that these command options should be the first in the list. Second command option can be f . If -f option is given then the code will perform queries on each of the words in query file. All of the remaining arguments are text files to include in the dictionary. For example, without modifying your code at all you should be able to compile then run: ava Search -array.java Search -array -f myqueryfile inpl.txt inp2.txt to build a dictionary from the code itself. Note that if the 1st option is test then all the other command options will be ignored. If-f option is not given then after parsing the text files to be included in the dictionary, the program waits for user input. To perform a search, enter a single word then hit return. To exit, enter the EOF character (Ctri-D). The main classes in the code are Search and Engine. The important methods are main0, which parses the command options/arguements and creates an engine which is used to parse files using Engine.parseFile0 which reads a file into the dictionary. For each word in the file, parseFile inserts

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

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions