#include using namespace std; int data_hash(string s){ int sum = 0; for(auto c : s) sum += c; return sum; } #include "hash_table.h" int main(){ HashTable test_table; test_table["fox"] = 100; test_table["orange"] = 47; test_table["mouse"] = 27; test_table["orange"] = 243; test_table["phone"] = 0; test_table["owl"] = 20; test_table["turkey"] = 1; test_table["friday"] = 30; if(test_table.contains("river")) cout << "The hash table contains river\n"; else cout << "The hash table doesn't not contain river\n"; if(test_table.contains("fox")) cout << "The hash table contains fox\n"; else cout << "The hash table doest not contain fox\n"; cout << test_table["fox"] << endl; cout << test_table["orange"] << endl; cout << test_table["mouse"] << endl; cout << "Contents: " << endl; for(auto &k : test_table) cout << k << ": " << test_table[k] << endl; return 0; }