You should implement hashing in two different methods to resolve
In this project, you will maintain the information of different courses
using Hashing. Your program will read the courses and their relevant
information from a file named offered_courses.txt. As well, the user
should be able also to enter new courses into the program with their
relevant information.
Please use the following format for inputs
Course:CreditHours#CourseCode#Department/topic1, topic2, …,
topicN
where N is the number of topics covered in the course and it is ≥ 1.
Example of input courses:
Course:CreditHours#CourseCode/topic1, topic2, …,
topicN
Data structures:4#COMP2421#Computer
Science/recursion, time analysis, linked lists,
stacks, queues, trees, bst, avl, splay, b_trees,
hash, heaps, sorting, graphs
Introduction to programming:3#COMP133#Computer
Science/
selection, loops, pointers, arrays, structs
Introduction to French:3#FREN111#French
Language/letters, numbers, greetings, grammars,statements
You will have to create a hash table to store the courses’ information
(use course name as a key).
You should implement hashing in two different methods to resolve
collisions using open-addressing and double hashing and generate 2
different hash tables each using the different methods.
The following options should be available for the user. For each option,
you should provide the related information for both hash tables you
have created:
1. Print hashed tables (including empty spots).
2. Print out table size and the load factor.
3. Print out the used hash functions.
4. Insert a new record to hash table (insertion will be done on
both hash tables).
5. Search for a specific word (specify which table to search in).
6. Delete a specific record (from both tables).
7. Compare between the two methods in terms of number of
collisions occurred.
8. Save hash table back to a file named saved_courses.txt (of the
double hashing)
Step by step
Solved in 2 steps with 1 images