Project4 - ECE 242 Project 4 For this project we will be dealing with Hash Tables and Trees Using a dictionary file that we provide you will hash

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 242 Project 4 For this project, we will be dealing with Hash Tables and Trees. Using a dictionary file that we provide, you will hash all the words from the file and create a Hash Table. Once you have a fully-populated Hash Table, you will create a little 'game' that will involve using the Hash Table and a Tree. All will be revealed shortly. Hash Table In this project, the Hash Table will use a chaining mechanism. What this means is that the table will essentially be an array of Linked Lists. Step 1 – Creating the hash table objects: Create a class called ' ListNode .' This object functions similar to the Linked List object nodes that you've seen countless times throughout the course of the semester. These objects will store a single dictionary word listing and an object reference to the next ListNode in the Linked List. Step 2 – Creating the hash table: Create an array of ListNode objects to store each of the Linked Lists that you create. Your array should contain 10,000 entries. hashItems: Create a method that will hash the Strings to an integer value. You may not use any Java hashcode function or any other kinds of libraries. Put: Create a method that will take a given String, hash the String, and append a ListNode object containing that String to the end of the Linked List at the index that the hashing function produces.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/20/2010 for the course ENGINEERIN 242 211 taught by Professor Tessier during the Spring '10 term at UMass (Amherst).

Page1 / 4

Project4 - ECE 242 Project 4 For this project we will be dealing with Hash Tables and Trees Using a dictionary file that we provide you will hash

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online