Sans Pareil Technologies, Inc.

Key To Your Business

Assignment 3

Add a hash function to the Person class you developed in Assignment 2. Do some online research and come up with a different way for implementing the hash function than what was used in Lab 4. For testing make sure different instances of person return different hash values, and that same instances return the same value.

Add functions that will allow for fast retrieval of a person (assume that email address is unique) by their email address as well as to check if a specified person instance exists in the address book. Add tests (both positive and negative) for the new functions.
bool exists( const Person& person ) const;
const Person* find( const std::string& email ) const;