Question: Help In Java! Create a program that will input the first 100 words from the file words.txt (this HAS duplicates, but not in the first

Help In Java!

Create a program that will input the first 100 words from the file words.txt (this HAS duplicates, but not in the first 100 words). You will then pass each word to a hash function and compute its hash value like this:

(the ascii value of the first character plus the ascii value of the second character ) mod 121.

The number appearing before the string is the loop number, then comes the word, then the hash value.

Dont make it complex! Keep it simple

words.txt:

noncollectable

reallocation

drenching

obnoxious

venality

dybbuk

shotgun

changelessly

handiwork

unheralded

dovecote

anode

spellbind

psychologist

improvisational

prejudiced

apply

pokey

HashValuesAnswers.doc:

0 noncollectable 100

1 reallocation 94

2 drenching 93

3 obnoxious 88

4 venality 98

5 dybbuk 100

6 shotgun 98

7 changelessly 82

8 handiwork 80

9 unheralded 106

10 dovecote 90

11 anode 86

12 spellbind 106

13 psychologist 106

14 improvisational 93

15 prejudiced 105

16 apply 88

17 pokey 102

18 secular 95

19 masterfully 85

20 at 92

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!