Question
In C++, we will be implementing a hash table using chaining as the collision resolution technique that will assist the user in searching for a
In C++, we will be implementing a hash table using chaining as the collision resolution technique that will assist the user in searching for a pet that matches their search criteria. Such as someone might want to find a pet that is small that doesn't shed. Someone else might be interested in a guard dog. To really experiencing hash tables, we need a large quantity of data, so we are going to use an external data file. The first step is to use an editor and enter in the information about all of the pets you want to match to deserving homes.
For each animal, you should keep track of the following information: 1) Breed (e.g., Schipperke) 2) Category (e.g., Dog) 3) Personality (e.g., Energetic) 4) Purpose (e.g., Belgium Boat Dogs) 5) Size (e.g., Small) 6) Keywords of Interest (e.g., Loyal) 7) Add one area of your own (or more) Make sure to have a delimiter between your data, such as a '|' between each field and a after the last item. Programming Data Structure: Implement the table abstract data type using a hash table (with chaining). Make sure your hash table's size is a prime number. The search key will be the "Keyword". The client should have a menu that allows the choice for adding, display, removing and retrieval to allow testing of the following tasks: The Table ADT operations are: Task 1. Constructor a. Take an argument for the table size Task 2. Private Function: Hash Function Task 3. Add an Animal Task 4. Load the information from an external data file a. Display all - just for testing purposes Task 5. Display the information for a particular match by Keyword Task 6. Retrieve the information for a particular match by Keyword a. Retrieve is NOT a display function. I would suggest passing in an array to the function and filling it with all matching items Task 7. Destructor Task 8. Remove by keyword Task 9. Display all of a certain Personality NOTE: I don't know how to load the external file and add all information into the hash table (task 4). Task 3 only asks to add an animal, I think I only need to add it to the external file. And I think I have to add all information from the file into two hash table (one for keyword and one for personality (task 9))
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started