Completed

Implementing a Dictionary with a Hash Table

The project is in three java files (plus [url removed, login to view] and [url removed, login to view])

[url removed, login to view]: contains the top-level Main()

[url removed, login to view]: contains the hash-based counting structure

[url removed, login to view]: read words from the file

Write a get(String w), put(String w, int count), and void print() method. The containsKey() method is finished, do not change that.

Use dictionary d = new HashDict()(you will have to uncomment it);

Comment out HashMap<String,Integer> d = new HashMap<String,Integer>();

Print the words and their occurrences (not necessarily in alphabetical order);

If word w, with hash(w) = h, is not found, you will add it to the front of list HTable[h]. You do that like this: HTable[h] = new Cell(w, 1, HTable[h]);

The hash function will be the following (as before, we have a little extra work to make sure it returns values >= 0):

private int hash(string s) {

int val = [url removed, login to view]() % HMAX;

if (val < 0) val += HMAX;

return val;

}

Here is the output of a run on the file [url removed, login to view]:trust: 1

a: 2

or: 1

depend: 1

confidence: 1

for: 1

worthy: 1

is: 2

your: 1

an: 1

the: 1

reliable: 1

that: 3

can: 2

person: 1

organization: 1

of: 1

attribute: 1

mechanism: 1

you: 2

on: 1

Skills: Java

See more: dictionary hash table java, write program demonstrate hash table, dictionary implementation using hash table java, hashtable dictionary java, hash table for strings in c, hashtable in c tutorial, hash function in c programming, implementation of dictionary using hashing, c program to implement functions of dictionary using hashing, dictionary adt using hashing in c, hash function for dictionary in c, hash table dictionary java, hash table implement dictionary, dictionary hash table implementation java, implement dictionary using hash table java, implement dictionary using hash table, dictionary implementation using hash table, java dictionary hash table, hash table dictionary java implementation, dictionary implementation hash table java

About the Employer:
( 1 review ) CHICAGO, United States

Project ID: #16596571

Awarded to:

stanislav103

Hi Thanks for your kind watching. I have read your descriptions. I have rich experiences of java programming. If you hire me, I will provide you perfect result. Kind regards. Toru.

$15 USD / hour
(12 Reviews)
3.7

3 freelancers are bidding on average $26/hour for this job

$50 USD / hour
(45 Reviews)
5.6
havihavish

I have done a similar project. If u give me this project I will submit u in time. Maybe I am new to freelance projects but i am not new to Java projects at all. I am A+ certified on java course from Hewlett-Packard More

$13 USD / hour
(0 Reviews)
0.0