Question: This is for Java programming: Description: Creating and Using A Binary Search Tree for Storing Name and Popularity Data Your program will create and search

This is for Java programming:

Description: Creating and Using A Binary Search Tree for Storing Name and Popularity Data Your program will create and search a binary search tree of name and occurrence data, based upon the 2000 census data of babies born that year. The basic program will:

1. Read a file of names and how often they occurred in the 2000 census data.

2. Create a binary search tree to store the names and the number of times they occurred, as given by the data on the line with the name.

3. Then prompt the user for a name.

4. Search the tree for the name. a. If the name is in the tree, the program will return the name, and the number of times it occurred in the census data. b. If the name did not occur, it will report this fact.

5. Either way, the program will return how many nodes it had to visit in its search.

6. The program will repeat the prompt and search until the name Exit or exit is given, and then the program will end. In the basic program, all you need to implement is a simple binary search tree, not an AVL or any other kind of balanced tree. The file is called census.txt

The census files format looks like :

Buffy 0 Nathaniel 64 Elyse 823 Shyann 771 Saige 942 Arno 0 Ciara 284 Flo 0 Yamilet 804 Clay 402 Clarance 0 Catina 0 Antwan 713 Bridget 278 Alan 162 Nickolas 283 Austin 23 Alfred 575 Georgine 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!