1) The document outlines instructions for an assignment to implement a hash table using a given seed data of currency objects previously used to build a binary search tree. It describes populating a hash table of size 29 using a pseudorandom hash function and resolving collisions with quadratic probing. It also describes printing statistics and allowing the user to search for objects.
In C++ Follow all code styling and submission instructions a.pdf
1. In C++
Follow all code styling and submission instructions as outlined for previous labs. Write a program
to do the following: Use the same input seed data you used for Lab 4 (your BST homework) as
seed input data into a hash table. Declare a hash table of size 29 elements. To hash your currency
objects into the hash table, use the pseudorandom hash scheme - (m*w + n*f) % size - where size
= 29, m = 2, n = 3, w = whole value, f = fractional value. For collision resolution, use quadratic
probing in the same direction always. Remember to circle around to the start of the array if
needed. Your main will first load the data into the hash table and print the number of data items
loaded, load factor and number of collisions. Then it will ask the user in a loop to enter a Krone to
search for. If the Krone object is found in the hash table, it will print the index where found,
otherwise it will print 'Invalid Data'. Then it will ask the user if they want to check again or end the
program. To submit, upload your code files and screenshot of the console only. For
documentation, only name blocks and existing documentation in your Krone class are needed.
#include<iostream>
#include<fstream>
using namespace std;
class Node
{
public:
float value;
Node * left;
Node * right;
Node (float value)
{
this->value = value;
right = NULL;
left = NULL;
}
};
using namespace std;
int
main ()
{
BST bst;