Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part 1 : Program Create an application as described below to store and retrieve data using the AVL binary search tree data structure. Write an
Part : Program
Create an application as described below to store and retrieve data using the AVL binary search
tree data structure.
Write an application GenericsKbAVLApp to read in the attached text file GenericsKBtxt
and store the data items within an AVL Tree. Each data item consists of a term which should
be used as the key assume that there won't be duplicate keys in the dataset sentence and
confidence score.
After loading the dataset, a second file GenericsKBqueries.txt should be read in This file
consists of a list of items one item per line only. The application should perform a search for
each of the query items one at a time If the item eg "tree" is found in the AVL tree, the data
item should be printed out eg "tree: Trees remove carbon dioxide from the atmosphere.
If there is no match, an appropriate message should be printed out eg "Term not
found: tree"
Your AVL Tree implementation can be created from scratch or reused from anywhere. You
may use the sample code provided. You may NOT replace the AVL Tree with a different data
structure. Use output redirection in Unix to save the output of each run to a file.
Test that your application can load the dataset correctly, and manually construct a query file
with queries to test that the application can handle queries with both terms in the dataset and
terms not in the dataset correctly.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started