Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Need someone to write Hashtable code...

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Need someone to write Hashtable code...

    Here are the requirements for what I need done:
    Write a Java program that implements two hashing tables using different hashing functions. Insert the same data items into both, and evaluate your results as follows:
    1. Use the Random class to generate a minimum of 40 seven-digit integers. You will need to access the individual digits of these integers…you may leave them as numeric or convert them to strings. (You may find it beneficial to be able to test repeatedly with the same data, so you might want to provide a way of saving the generated data to a file. You might give your user the option of using an existing file or generating a new set of numbers each time you run your program.)
    2. Implement your hash tables with arrays. You may use two separate arrays or one multi-column array.
    3. Using your generated data, insert each item into the first of your hash tables using an extraction method hashing function, perhaps the last two digits of each seven digit number (or string).
    4. Use a division method hashing function for the second. Base your divisor on the number of items you generate.
    5. Use linear probing for collisions.
    6. When you hash tables are fully populated, find each of your original data items by computing the appropriate hash key and searching each table.
    7. Produce a formatted report with the following items:
    a. How many comparisons were necessary to find each item in each table?
    b. What is the total number of comparisons necessary to find the items in each table?
    c. What is the average number of comparisons necessary to find an item in each table?
    8. Generate multiple iterations of random numbers. Do you results with multiple sets show a trend indicating that one hash function is better than the other for this type of data?
    I will pay $50 for writing the program. Payment will be done with paypal. Thanks for any help


  2. #2
    Junior Member
    Join Date
    Aug 2011
    Posts
    12
    My Mood
    Cheerful
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: Need someone to write Hashtable code...

    Quote Originally Posted by realrx7 View Post
    Here are the requirements for what I need done:
    Write a Java program that implements two hashing tables using different hashing functions. Insert the same data items into both, and evaluate your results as follows:
    1. Use the Random class to generate a minimum of 40 seven-digit integers. You will need to access the individual digits of these integers…you may leave them as numeric or convert them to strings. (You may find it beneficial to be able to test repeatedly with the same data, so you might want to provide a way of saving the generated data to a file. You might give your user the option of using an existing file or generating a new set of numbers each time you run your program.)
    2. Implement your hash tables with arrays. You may use two separate arrays or one multi-column array.
    3. Using your generated data, insert each item into the first of your hash tables using an extraction method hashing function, perhaps the last two digits of each seven digit number (or string).
    4. Use a division method hashing function for the second. Base your divisor on the number of items you generate.
    5. Use linear probing for collisions.
    6. When you hash tables are fully populated, find each of your original data items by computing the appropriate hash key and searching each table.
    7. Produce a formatted report with the following items:
    a. How many comparisons were necessary to find each item in each table?
    b. What is the total number of comparisons necessary to find the items in each table?
    c. What is the average number of comparisons necessary to find an item in each table?
    8. Generate multiple iterations of random numbers. Do you results with multiple sets show a trend indicating that one hash function is better than the other for this type of data?
    I will pay $50 for writing the program. Payment will be done with paypal. Thanks for any help
    Please check your PM

  3. #3
    Junior Member
    Join Date
    Apr 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Need someone to write Hashtable code...

    Replied to your private message.

  4. #4
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Need someone to write Hashtable code...

    Presuming this is homework - these forums are not here to help you cheat - they are here to help you learn. I Highly recommend trying the problem, and posting questions where you are stuck. If not, and if you do receive a solution, you should realize this is academic dishonesty, and those contributing to this behavior are doing the same - and do get banned from forums for such behavior, but more importantly do get you kicked out of school (for good reason)

Similar Threads

  1. How would you write this code?
    By laughingeyes18 in forum Object Oriented Programming
    Replies: 2
    Last Post: December 1st, 2011, 09:46 AM
  2. how to write code using servlets, jsp and mysql database
    By bvn456 in forum Java Theory & Questions
    Replies: 4
    Last Post: June 28th, 2011, 01:51 PM
  3. Trying to write Factoring Numbers Code--Please Help.
    By uks2h in forum What's Wrong With My Code?
    Replies: 4
    Last Post: November 11th, 2010, 08:20 PM
  4. [SOLVED] Hashtable and Key Size
    By sapzero in forum Collections and Generics
    Replies: 0
    Last Post: January 28th, 2010, 02:31 PM
  5. How can i write this in code?
    By Mr. steve in forum Java Theory & Questions
    Replies: 2
    Last Post: November 30th, 2009, 10:07 PM