Starting from:
$35

$29

Project Solution

Source Code




The Java classes provided in the zip file attached to the assignment Dropbox are:







 
OpenHashing.java




 
ClosedHashing.java




 
HashTable.java




 
HashTableKeyException.java




Provided text file




 
words.txt




Under no circumstances are you allowed to create a new OpenHashing, ClosedHashing, HashTable, or HashTableKeyException class. Lastly, you may not modify the words.txt file.




You will reuse the List and ArrayList classes developed in previous homework assignments. Under no circumstances are you allowed to modify these classes, you must use these files as is.




You may only modify the TODO sections in the OpenHashing, ClosedHashing, and HashTable classes. In particular, in this class you may only modify the methods listed in Part 1, and under no circumstances are you allowed to remove, add, or modify any other line of code in this class this include instance variables, class variables, constants, etc.




Lastly, you may not change the package structure! Specifically, edu.cofc.csci230 cannot be removed or modified. If a solution is submitted with a different package structure, it will not be graded, no exceptions.




Part 1




In the HashTable class please fully implement the methods listed below:







 
public int calcHash( String key )




In the OpenHashing and ClosedHashing classes please fully implement the methods listed below:




 
public int search( String key ) throws HashTableKeyException




 
public void insert( String key ) throws HashTableKeyException




 
public int delete ( String key ) throws HashTableKeyException




 
public double loadFactor()




 
public double successfulSearches()




 
public double unsuccessfulSearches()




In each method listed above, you will see a TODO comment, this is where your coding solution is added. In the provided source code, numerous comments are given; please ensure you read them carefully. Additionally, in the supplemental course textbook (PDF provided in content section on OAKS) provides explicit details of each hashing data structure along with the metrics (load factor, successful searches, and unsuccessful searches) that are used to assess the time efficiency.




Part 2




In the OpenHashing and ClosedHashing classes there is a main method. In the main please complete the 8 coding steps (see TODO comment) for both hash functions.




Submission




Create a zip file that only includes the completed OpenHashing, ClosedHashing and HashTable files. If you have any questions about the submission policy, you must resolve before the due date. Lastly, please plan appropriately, asking questions the day the assignment is due (within 12 hours) is too late. Please try to resolve any questions at least 2 days before the due date.




The name of the zip file must be your last name. For example, ritchie.zip would be correct if the original co-developer of UNIX (Dennis Ritchie) submitted the assignment. Only assignments submitted in the correct format will be accepted (no exceptions).




Please submit the zip file (via OAKS) to the Dropbox setup for this assignment by the due date. You may resubmit the zip file as many times as you like, Dropbox will only keep the newest submission. Per the syllabus, late assignments will not be accepted – no exceptions. Please do not email Hassam or I your assignment after the due date, we will not accept it.

Grading Rubric










Code solution compiles
10 points
Main methods (10 points each)
20 points
HashTable calcHash method
10 points
OpenHashing search method
10 points
OpenHashing insert method
10 points
OpenHashing delete method
10 points
OpenHashing loadfactor method
10 points



OpenHashing successfulSearches method
10 points
OpeHashing unsuccessfulSearches method
10 points
ClosedHashing search method
10 points
ClosedHashing insert method
10 points
ClosedHashing delete method
10 points
ClosedHashing loadfactor method
10 points
ClosedHashing successfulSearches method
10 points
ClosedHashing unsuccessfulSearches method
10 points



In particular, each data structure will be graded as follows.




 
Does not compile: 0 of 100 points




 
Compiles but does not run: 10 of 100 points




 
Main methods: 30 of 100 points




 
HashTable method (code inspection): 40 of 100 points.




 
Open and ClosedHashing methods (code inspection): 160 points




Note: the majority of the points are based on the implementation of the methods. The instructor will carefully review each coding solution.

 
Lastly, this is an individual assignment, i.e. no collaboration is permitted. Plagiarism will not be tolerated. Submitted solutions that are very similar (determined by the instructor) will be given a grade of zero. Please do your own work, and everything will be OK.

More products