#include "stdinc.h" #include "dictionary.h" // Write the implementation of the CSC120Dictionary class here // This implements the multiplication method for computing a hash function // with m = 100 and A = .618. int hash(int k) { double a = .618, frac; int hash_value; frac = (k * a) - (int) (k * a); // computs k*a - floor(k*a) hash_value = (int) (100.0 * frac); // Keeps most two significant digits of // frac to return as the hash value return hash_value; } CSC120Dictionary::CSC120Dictionary(){ // YOU FILL THIS IN } void CSC120Dictionary::insert(int key, DataRecord data_rec) { // YOU FILL THIS IN } void CSC120Dictionary::del(int key) { // YOU FILL THIS IN } void CSC120Dictionary::update(int old_key, int new_key, DataRecord new_data){ // YOU FILL THIS IN } DataRecord* CSC120Dictionary::search(int key){ // YOU FILL THIS IN }