QUESTION 1 Description: In your homework you had to create a linked list and a hash...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
QUESTION 1 Description: In your homework you had to create a linked list and a hash table using your linked list class. In that solution you used a linked list class within a hash table class. For this task, create a simple hash table that implements separate chaining directly and does NOT use a linked list class. Use the "Hash Table: Separate Chaining" presentation given in class as a guide and implement the case "Separate Chaining Methods: Array of Head Pointers." Use the standard Data and Node structs we have been using in class for Nodes, but you will not need a "previous" pointer. Your linked lists need to only be singly linked and do not need to maintain order (this makes things much simpler). Specifications: Use the "Hash Table: Separate Chaining" presentation given in class as a guide, and implement the case "Separate Chaining Methods: Array of HeadPointers." Use the linked list repos shown in class as a guide. The links to those repos are in your linked list homework instructions. Your linked lists MUST be singly linked (just always insert to the head or tail) and do not maintain order within each list. Conform to all the definitions of standard hash table implementing separate chaining where the hash table ADT itself implements the linked list methods (rather than having a linked list class embedded in the hash table). Implement the addEntry, removeEntry, getEntry, count, and display Table methods. Use modulo for your hash function. Make your hash table size 10. Make a complete and properly architected, loosely-coupled class as discussed in lectures and notes, and conforming to all best practices. Make a main.cpp, main.h to test your hash table. Make all appropriate, complete, and exhaustive tests to prove your class works. Turn in only 4 files, main.cpp, main.h, hash.cpp, hash.h. Everything your program needs MUST be in those four files and ONLY those four files with those exact filenames. Hint: Although you may not have more than one class per set of h/cpp file, you may include supporting structs in your class header file. Your code will be graded no different than any normal homework submission and must conform to all class submission guidelines. Your code MUST compile with ONLY the files you submit, nothing more nothing less. If your code does not compile at the command line with the standard compile command given in class there will be a significant grade penalty, up to and including a grade of 0. You will be graded based on all best practice guidelines presented in class. Submission: When you are ready to submit, place your 4 files in a single zip file, attach it to this question and upload it. Your zip file must contain ONLY those 4 files, no other files, no project or IDE files, no Mac OS files, and no directories including no top level directory). Inclusion of any other files/directories will incur an automatic 5% penalty. Mac people, you cannot use the built in zip utility because it will add extra files you cannot see, but Linux can (you are graded on Linux). Use the command line or a 3rd party zip utility to zip. Double check your zip files before submitting! Attach File 50 poin QUESTION 1 Description: In your homework you had to create a linked list and a hash table using your linked list class. In that solution you used a linked list class within a hash table class. For this task, create a simple hash table that implements separate chaining directly and does NOT use a linked list class. Use the "Hash Table: Separate Chaining" presentation given in class as a guide and implement the case "Separate Chaining Methods: Array of Head Pointers." Use the standard Data and Node structs we have been using in class for Nodes, but you will not need a "previous" pointer. Your linked lists need to only be singly linked and do not need to maintain order (this makes things much simpler). Specifications: Use the "Hash Table: Separate Chaining" presentation given in class as a guide, and implement the case "Separate Chaining Methods: Array of HeadPointers." Use the linked list repos shown in class as a guide. The links to those repos are in your linked list homework instructions. Your linked lists MUST be singly linked (just always insert to the head or tail) and do not maintain order within each list. Conform to all the definitions of standard hash table implementing separate chaining where the hash table ADT itself implements the linked list methods (rather than having a linked list class embedded in the hash table). Implement the addEntry, removeEntry, getEntry, count, and display Table methods. Use modulo for your hash function. Make your hash table size 10. Make a complete and properly architected, loosely-coupled class as discussed in lectures and notes, and conforming to all best practices. Make a main.cpp, main.h to test your hash table. Make all appropriate, complete, and exhaustive tests to prove your class works. Turn in only 4 files, main.cpp, main.h, hash.cpp, hash.h. Everything your program needs MUST be in those four files and ONLY those four files with those exact filenames. Hint: Although you may not have more than one class per set of h/cpp file, you may include supporting structs in your class header file. Your code will be graded no different than any normal homework submission and must conform to all class submission guidelines. Your code MUST compile with ONLY the files you submit, nothing more nothing less. If your code does not compile at the command line with the standard compile command given in class there will be a significant grade penalty, up to and including a grade of 0. You will be graded based on all best practice guidelines presented in class. Submission: When you are ready to submit, place your 4 files in a single zip file, attach it to this question and upload it. Your zip file must contain ONLY those 4 files, no other files, no project or IDE files, no Mac OS files, and no directories including no top level directory). Inclusion of any other files/directories will incur an automatic 5% penalty. Mac people, you cannot use the built in zip utility because it will add extra files you cannot see, but Linux can (you are graded on Linux). Use the command line or a 3rd party zip utility to zip. Double check your zip files before submitting! Attach File 50 poin
Expert Answer:
Answer rating: 100% (QA)
To create a hash table implementing separate chaining without using a linked list class you can directly use arrays of head pointers and singly linked ... View the full answer
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
A specific purpose statement is not stated in the speech but includes both the general purpose and the topic. It often reveals the intended goal for the audience. O True False
-
What is a forward contract, and how does it typically differ from an exchange traded futures contract?
-
Why do most programs use interrupt-driven I/O over busy/wait?
-
Length of cross belt connecting two pulleys of radii \(r_{1}\) and \(r_{2}\) and at a center distance \(D\) apart, is: (a) \(\pi\left(r_{1}+r_{2} ight)+\left(r_{1}-r_{2} ight)^{2} / D+2 D\) (b)...
-
Prepare an income statement through gross profit for Bellingham Company for the month ending March 31 using the variance data from Brief Exercises 1, 2, 3, and 4. Assume Bellingham sold 15,000 units...
-
2022 792000 20% 2023 948000 15% The installment income is Crane's only temporary difference. What amount shoul Crane's December 31, 2020 balance sheet?
-
Your individual work this week is to develop and design an organization chart identifying lines of authority and responsibility. Design the following in a PowerPoint document: Create an...
-
On June 28, 1997, in Las Vegas, heavyweight boxers Mike Tyson and Evander Holyfield met for what proved to be a night to remember. During the third round of the fight, a desperate Tyson illegally bit...
-
Nereus Montemayor was an employee of VZ Hogs, a company that raises hogs and produces hog feed. VZ Hogs used an extruder manufactured by Sebright Products, Inc. to create hog feed out of discarded...
-
Many single women and married couples use donated sperm to conceive children each year. Pennsylvania resident Donna Donovan decided to use donated sperm from Idant Laboratories, a New York sperm bank...
-
Patty Hayes owned four Personal Seat Licenses (PSLs) at the Cleveland Browns Stadium. Hayess PSLs reserved four seats on the 50-yard line, at the railing, on the north side of the stadium. As the...
-
Taj Mahabub was the founder and CEO of GenAudio, a Colorado-based audio technology company. GenAudio had struggled financially practically since its formation, and Mahabub wished to secure a...
-
Sketch the expected charge versus pH curve for humic substances. How does this differ from a pure compound with one functional group such as acetic acid? You should make reference to the key...
-
SBS Company have received a contract to supply its product to a Health Care Service Hospital. The sales involve supplying 1,250 units every quarter, the sales price is RM 85 per unit. The Client...
-
When a computer executes a program, will it be in main memory or auxiliary memory?
-
What output will be produced by the following code? public class Demo { public static void main(String[] args) { System.out.println("The output is:"); bar(11156); System.out.println(); } public...
-
Write an JavaFx application for the problem described in Exercise 18. Exercise 18. Write statements that can be used in a JavaFX application to draw the five interlocking rings that are the symbol of...
-
You are studying survival times for mice given a drug at one of three doses (Low, Medium, or High). You define two dummy variables: (a) With these definitions, write the expressions for the mean...
-
The data in Table 8.25 were collected in order to study factors affecting the supply and demand for commercial air travel. Data on various aspects of commercial air travel for an arbitrarily chosen...
-
We have data on the distance covered by irrigation water in a furrow of a field. The data are to be used to relate the distance covered to the time since watering began. The data are given in Table...
Study smarter with the SolutionInn App