Project 5:  Hash Tables and Its Applications

Due: Fri, Apr 12


Objectives:  Understand and get familiar with the hash table data structure, along with its application in managing user accounts.

Task: Implement a hash table ADT and other supporting user interfaces;  develop a simple password server program.

Project Description:

This project contains two parts. In the first part of the project, you need to implement a hash table class template named HashTable. In the second part of the project, you will develop a simple password server program using the hash table you developed.

Task 1: Requirements of HashTable Class Template

Public HashTable interface (K and V are template parameters (generic data types), which represent the key and value types for a table entry, respectively)

Private helper functions

Make sure to declare as const member functions any for which this is appropriate

You need to write a simple test program to test various functions of hash table. More details are provided in a later part of this description.


Task 2: Requirements of the Password Server Class (PassServer)

 

Driver Program: In addition to developing the HashTable class template and the PassServer class, you need to write a driver program to test your code. Name the driver program proj5.cpp.


Extra-credit (10 points) 

You may submit an alternative version to your program named sproj5.cpp, in which the program hides the user's entries whenever the user keys in a password or new password. 


Provided Partial Code

The following partial code has been provided to you.

  1. hashtable.h: partial implementation
  2. hashtable.hpp: partial implementation
  3. proj5.cpp: driver program, partial implementation.
  4. proj5.x : sample executable for linprog.cs.fsu.edu
  5. sproj5.x: sample executable with hidden password entries for linprog.cs.fsu.edu
  6. test1: sample test case (which contains the commands that a user will type). You can redirect it to proj5.x as "proj5.x < test1". Results will save in the file "outtest1"
  7. scrypt.cpp: sample program to use crypt() to encrypt password. 
  8. scrypt.x: executable code of scrypt.cpp.

Deliverables

1.  Your implementation must be entirely contained in the following files, which MUST be named in the same way. 

  1. hashtable.h
  2. hashtable.hpp
  3. passserver.h
  4. passserver.cpp
  5. proj5.cpp
  6. sproj5.cpp (optional, for extra-credit)
  7. makefile

2. Submit all the files in a tar file via the Canvas system. If you have implemented the extra-points version, please indicate so when you submit your homework.

3. Your program must compile on linprog.cs.fsu.edu. If you program does not compile on linprog, the grader cannot test your submission. Your executable(s) must be named proj5.x and sproj5.x (for extra-credit option).

4.   The interaction and output (including error messages) of your client's executable(s) must behave in the same manner as the distributed proj5.x and sproj5.x (on linprog.cs.fsu.edu). For example, one of the ways to test your program would be to run a "diff" command between the output file(s) created by your executable(s) and the output file(s) created by the distributed executable(s). 

You can also run the "proj5.x" file directly from linprog from my account, with this command:

   ~myers/dsprog/proj5.x

Points will be deducted for not complying with these requirements.