(There is no main.cpp file for this question you need to create yourself) FAST-Library wants to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
(There is no main.cpp file for this question you need to create yourself) FAST-Library wants to upgrade its system for storing books. The current system is slow, as it is based on arrays. The first plan was to store the data in the form of balanced trees, but FAST management had rejected this idea as it would create difficulties while adding thousands of books. Every entry might need to balance the tree that is time consuming. The FAST development team and management team agreed on hashing technique for their new system. You task is to build a system for storing the books in the hash tables. have two types of specifiers for books. The first is author name, while the second is book title. The system will e based on the hash of hash tables. The first hash table contains the author's name. All the books written by a particular author will be stored in the hash-table of that author. Example: Book-1: How to Program in C++ by XYZ Book-2: How to Program in Java by XYZ Book-3: How to Program in Python by XYZ Book-4: How to Program in C++ by ABC Book-5: How to Program in MATLAB by ABC ID 0 1 Author XYZ ABC 4> ID 0 1 2 ID 0 1 Book Title How to Program in C++ How to Program in Java How to Program in Python Book Title How to Program in C++ How to Program in MATLAB In the above example, you have to insert the authors in a separate hash table. In front of author XYZ, there will be another hash table that contains the books of that author. In simple words, you have to link another hash table in front of authors' name. You can perform linear/quadratic/cubic probing in case of collisions. Make sure that your system does not lead to primary clustering. Note: Chaining is not allowed in this question. Tasks: 1) Design hash-function(s) to store the authors name and book names at the correct position (Hash- functions with minimum number of collisions will get more marks). Choose the sizes of the hash tables wisely. 2) Count the number of collisions for each table. 3) Handle the collision cases with probing. 4) Your program must be able to perform insertion and deletion. 5) Your program must also be able to perform different types of searching. a. For example, program should be able to display all books of a particular author. The program must also be able to search book if the title is given. It must display all the books with same title and with different author's names. Searching Example: Query: Author Name is ABC Results (2 books): How to Program in C++, and How to Program in MATLAB Query: Book name is How to Program in C++ Results (2 authors): This book is available with two authors names: ABC, and XYZ 6) Make a proper menu so that admin can use the system 'efficiently. Note: Books data is given. Use this data. Any other data used by the program may lead to zero marks. (There is no main.cpp file for this question you need to create yourself) FAST-Library wants to upgrade its system for storing books. The current system is slow, as it is based on arrays. The first plan was to store the data in the form of balanced trees, but FAST management had rejected this idea as it would create difficulties while adding thousands of books. Every entry might need to balance the tree that is time consuming. The FAST development team and management team agreed on hashing technique for their new system. You task is to build a system for storing the books in the hash tables. have two types of specifiers for books. The first is author name, while the second is book title. The system will e based on the hash of hash tables. The first hash table contains the author's name. All the books written by a particular author will be stored in the hash-table of that author. Example: Book-1: How to Program in C++ by XYZ Book-2: How to Program in Java by XYZ Book-3: How to Program in Python by XYZ Book-4: How to Program in C++ by ABC Book-5: How to Program in MATLAB by ABC ID 0 1 Author XYZ ABC 4> ID 0 1 2 ID 0 1 Book Title How to Program in C++ How to Program in Java How to Program in Python Book Title How to Program in C++ How to Program in MATLAB In the above example, you have to insert the authors in a separate hash table. In front of author XYZ, there will be another hash table that contains the books of that author. In simple words, you have to link another hash table in front of authors' name. You can perform linear/quadratic/cubic probing in case of collisions. Make sure that your system does not lead to primary clustering. Note: Chaining is not allowed in this question. Tasks: 1) Design hash-function(s) to store the authors name and book names at the correct position (Hash- functions with minimum number of collisions will get more marks). Choose the sizes of the hash tables wisely. 2) Count the number of collisions for each table. 3) Handle the collision cases with probing. 4) Your program must be able to perform insertion and deletion. 5) Your program must also be able to perform different types of searching. a. For example, program should be able to display all books of a particular author. The program must also be able to search book if the title is given. It must display all the books with same title and with different author's names. Searching Example: Query: Author Name is ABC Results (2 books): How to Program in C++, and How to Program in MATLAB Query: Book name is How to Program in C++ Results (2 authors): This book is available with two authors names: ABC, and XYZ 6) Make a proper menu so that admin can use the system 'efficiently. Note: Books data is given. Use this data. Any other data used by the program may lead to zero marks.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Compensation System Change Introduction As Melanie Griffith gazed through the window of her office, she could see some employees walking to the parking lot to get to their cars; others were on their...
-
Vijay Company reports the following information regarding its production costs. Compute its production cost per unit under absorption costing. Direct materials.................................. $ 10...
-
Aristotle claimed that the speed of a falling object depends on its weight. We now know that objects in free fall, whatever the gravitational forces on them, undergo the same gain in speed. Why don't...
-
Show that if a DECREMENT operation were included in the k-bit counter example, n operations could cost as much as (nk) time.
-
Figure 20.21 shows the flowsheet for a reactive distillation column for the production of ethylene glycol (EG) from ethylene oxide (EO) and water (Al-Arfaj and Luyben, 2002):...
-
The Lineberry Golf Cart Co. sold 7,400 carts this year at an average unit price of $3,000. Fifty days of sales remained uncollected in accounts receivable at the end of the year. The firm produced...
-
A metallic sphere of diameter 5 cm is initially at a uniform temperature of 300oC. Suddenly the metal sphere is immersed in a fluid at 30oC. The convective heat transfer coefficient between the...
-
The management of Rajpur Garments and Textiles Limited, a closely-held company, was reviewing the first-ever unfavourable financial performance of the company. In its recently concluded accounting...
-
Table 1 shows the recorded blow counts in an SPT test. A safety hammer with rope and pulley arrangement was used to drive the sampler in a 100 mm diameter borehole. Determine corrected N values, and...
-
Two flat plates Made of 1040 steel are arc welded using Electrodes Which Are also composed of 1040 steel. The plates are welded along their width on both the top and bottom of the plates Welding...
-
There are a few operational problems encountered when using the powder-bed fusion method , whether with a laser beam or an electron beam . List those operational problems , what causes them, and how...
-
Describe the key elements of a theory for qualitative research Explain how the theory supports the proposed study and understanding of the research topic of the gender pay gap for women with...
-
Theory Y management uses the empowerment of workers and gives them the power to report "bad workers" to management so that these bad workers will be reprimanded.
-
Read this New York Times article on Cambodian corruption: Cambodias New King Dances Into a Land of the Absurd (Links to an external site.), by Seth Mydans (October 23, 2004).* Here is the link for...
-
What are the principal differences among asset liquidity management, liability management, and balanced liquidity management?
-
Create a view that lists the name and phone number of the contact person at each publisher. Dont include the publishers ID in the view. Name the view CONTACT.
-
Which of the following is true? a. If you truncate a table, you cant add new data to the table. b. If you change the default value of an existing column, all existing rows containing a NULL value in...
-
Which of the following functions cant be used to convert the letter case of a character string? a. UPPER b. LOWER c. INITIALCAP d. All of the above can be used for case conversion.
-
Consider the Gompertz model in Eq. (12.35). Graph the expectation function for \(\theta_{1}=1, \theta_{3}=1\), and \(\theta_{2}=\frac{1}{8}, 1,8,64\) over the range \(0 \leq x \leq 10\). Equation...
-
Consider the following observations: a. Fit the nonlinear regression model \[ y=\theta_{1} e^{\theta_{2} x}+\varepsilon \] to these data. Discuss how you obtained the starting values. b. Test for...
-
Consider the model \[ y=\theta_{1}-\theta_{2} e^{-\theta_{3} x}+\varepsilon \] This is called the Mitcherlich equation, and it is often used in chemical engineering. For example, \(y\) may be yield...
Study smarter with the SolutionInn App