//-------------------------------------------------------------------- // // Laboratory 14 hashtbl.h // // Class declaration for the Hash Table ADT // //-------------------------------------------------------------------- #include #include "listlnk.cpp" using namespace std; template < class DT, class KF > class HashTbl { public: HashTbl ( int initTableSize ); ~HashTbl (); void insert ( const DT &newDataItem) throw ( bad_alloc ); bool remove ( KF searchKey ); bool retrieve ( KF searchKey, DT &dataItem ); void clear (); bool isEmpty () const; bool isFull () const; void showStructure () const; // In-lab functions double stdDeviation ( ); private: int tableSize; List
*dataTable; };