Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

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

There is alot of words! Only print the first 100 words! please. Output has to look like the the one in the hashvalue document. Do not put hasvalue document in the code! Only print the first 100 and print the loop number word and hash value! keep it simple!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

600 lb 20 0.5 ft 30 30 5 ft

Answered: 1 week ago

Question

2. Do you find change a. invigorating? b. stressful? _______

Answered: 1 week ago

Question

10. Are you a. a leader? b. a follower? _______

Answered: 1 week ago