Directory search using a binary search tree

Assignment Help Basic Computer Science
Reference no: EM131043688

1) Write a java program that is able to apply ahash function to a first and last name (key) ofa person, and lookup the appropriate index in ahash table modeling a telephone directory. Thetelephone number (value) should be returned ondoing a lookup (you can prepopulate the tablewith 20 entries for this purpose). You can useexisting Java code (or libraries) to model thehash table, however, your program should becustomized to use the hash table structureappropriately.Demonstrate that your program works by providingmeaningful console messages that walk the testerthrough the search function in the directory.

2) Implement the same telephone directory search using a Binary Search Tree.You can use existing Java code (or libraries) to model the BST, however, your program should be customized to use the BST structure appropriately.Demonstrate that your program works by providingmeaningful console messages that walk the testerthrough the search function in the directory.

Reference no: EM131043688

Questions Cloud

Length of the array or arraylist : Write a short Java application that stores words in an Array or ArrayList. You get to pick the number of words to store. Generate a random number between 0 (inclusive) and the length of the Array or ArrayList (exclusive).
Requires a portfolio with an expected return : In order to fund her retirement, Michele requires a portfolio with an expected return of 0.10 per year over the next 30 years. She has decided to invest in Stocks 1, 2, and 3, with 25 percent in Stock 1, 50 percent in Stock 2, and 25 percent in Stock..
Design a half adder circuit using only nand gates : Convert 0010001010000110 (BCD) into its binary equivalent and then divide it by 100102. Express your result in octal equivalent.
Remaining until maturity on bonds and yield to maturity : Large Industries annual bonds are selling at 95.70 (i.e., the price is $957 for the $1,000 bond). There are 8 years remaining until maturity on the bonds and the yield to maturity is 6.25%. Find the coupon rate.
Directory search using a binary search tree : Implement the same telephone directory search using a Binary Search Tree.You can use existing Java code (or libraries) to model the BST, however, your program should be customized to use the BST structure appropriately.Demonstrate that your progra..
Describe the qualities of valuable information : Describe the qualities of valuable information. Describe the different data types used in the fields of a database. Describe and explain how the different methods of validating data are used in a database.
When are two sets of functional dependencies equivalent : When are two sets of functional dependencies equivalent
Describe closure activities that must take place : Describe five closure activities that must take place to effectively close out a project.
Which of the following deals with transitive dependencies : Which of the following deals with transitive dependencies in normalization?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  The variable accounttwo being set

What is being called by line 20 of Listing 2? How is the balance value of the object referenced by the variable accountTwo being set?

  Write java program that allows the user to enter wall space

Write a Java program (from scratch) that allows the user to enter the wall space to be painted and the price of paint per gallon.

  Find how many register windows are available for use

Assume a RISC machine utilizes overlapping register windows for passing parameters between procedures. Machine has 298 registers. How many register windows would be available for use?

  Explain the pros and cons of thick or thin client char.

Explain the pros and cons of thick or thin client characteristics.

  Have methods to clear the machine state

Implement a VotingMachine class that can be used for a simple election. Have methods to clear the machine state, to vote for a Democrat, to vote for a Republican, and to get the tallies for both parties.

  Encrypt and decrypt messages

Write a program in C, in the Ubuntu Linux environment, to provide the end user with the ability to encrypt and decrypt messages, using a secret key

  Lounge independent projec

Download and extract the .zip file containing the data files for this project. Rename the outermost folder to be Lounge1-Your Last Name Your First Name.

  Create an implementation class.

Your code must compile using the jGrasp IDE. If your code does not compile using jGrasp (for any reason), a grade of 0 will be earned. No exceptions!

  Describe the various components of the logic of the study

Describe the various components of the logic of the study of science. How does an understanding of this logic contribute to an understanding of the goals of science?

  Write a fragment of code that accepts integers

write a condition to test if the point is outside the rectangle. Assume that x increases to the right and that y increases to the top. 2.Write a fragment of code that accepts integers from the user until a negative number is entered. The prompt sh..

  Computes all magic numbers

Write a program that, for any upper limit, computes all magic numbers less than that limit - A magic number is defined as a positive integer which is equal to the sum of its own factors

  What are the typical security classification

What are the typical security classification? Discuss the simple security property and the *-property, and explain the justification behind these rules for enforcing multilevel security.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd