22 Nov 2020
Write a program to do the following:
- Use the sample data file I provided for verifying the results of your BST homework (called bst_testfile.txt below) to enter data into a hash table.
- Your hash table should have as many entries as the data items in the file.
- The birthday should be used as the hash key by adding the digits repeatedly until it ends up being a number between 0 and 9, which will be the index of the data in the hash table. So, today’s date of 2017-12-04 will reduce as 2+0+1+7+1+2+0+4 = 17 which will further reduce as 1+7 = 8 and its associated data record (name + birthday) will be added to index 8 in the hash table.
- For collision resolution, use quadratic probing.
- Your main will first load the data file 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 birthdate – any date. If the birthdate is found in the hash table, it will print the name associated with that date, otherwise it will print ‘Invalid Data’. Then it will ask the user if they want to check again or end the program.
- I will test your program with my own version of the data file which may exist in any folder on my machine.
- Name all the necessary artifacts – projects, cpp file, zipfile, screenshots – as cis22c_lab6_<yourname>.<file extension>. Remember you need to replace text between < > appropriately.
- Upload only one zip file that contains everything including the full Visual Studio project files and exe.
- Remember to complete this lab SOLO.
- Also, remember to mention the lab whose score you wish to replace in the comment field. If there is no comment, this makeup will not be graded.
- There is only one submission deadline – EOD before you come for the final.
- Every day that the HW is submitted ahead of due date, an extra 2% credit will be awarded, up to a max of 25%. However, the extra credit will only be awarded if your pgm has no deductions at all for anything missing. In other words, you cannot add a partially functioning program to offset deductions with extra credit.
- Since this is a makeup, this lab will be graded more strictly than usual.