CS210
Fall 2007

Programming Project 4

 

Date: Tuesday, November 13, 2007

Due: Tuesday December 4, 2007.

 

 

 

Work in groups of 2-3 students to:

 

1.    Create a  List class template (linked list implementation) and assemble the files into List.h and List.cpp. In addition to safety methods replacing compiler generated defaults, the List class template should include the following methods:

    1. Constructing an empty list object.
    2. Inserting an item into the head of the list.
    3. Removing a specific item from the list.
    4. Searching for a specific element in the list.
    5. Printing the list to cout.

2.    Create a HashTable class template that uses chaining technique to resolve collisions. Table entries will be of the template class List type.

3.    Write a menu-driven client program that reads a collection of computer user-id’s and passwords from an input file ( no less than 20) and stores them in a hash table. The program should then display a menu that includes the following options:

    1. Display the resulting hash table.
    2. Validate user logins: read two strings representing a user’s id and password and then check whether this is a valid user of the system by searching the hash table for this id/password.
    3. Add a new user to the system indicating the position of the new item within the table.
    4. Removing a user from the system.

 

Deliverables:

      1. List class template header and implementation files.
      2. HashTable class template header and implementation files.
      3. The valid user initial input data file.
Hosted by www.Geocities.ws

1