In this project, you will maintain the information of a dictionary using Hashing. Your program will...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In this project, you will maintain the information of a dictionary using Hashing. Your program will read the words and their meanings (synonyms) from a file named words.txt. As well, the user should be able also to enter new words (and their meanings) into the program. Please use the following format for inputs Word:Meaning1 #Meaning2 #Meaning3 Example: good:fine#excellent#great Note that each word will consist of max of three synonyms only. You will have to create a hash table to store the words and use words as the keys. 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 word (from both tables). 7. Compare between the two methods in terms of number of collisions occurred. Here you have to print the number of collisions occurred (if happened) once every new word is inserted. 8. Save hash table back to a file named saved_words.txt (of the double hashing) In this project, you will maintain the information of a dictionary using Hashing. Your program will read the words and their meanings (synonyms) from a file named words.txt. As well, the user should be able also to enter new words (and their meanings) into the program. Please use the following format for inputs Word:Meaning1 #Meaning2 #Meaning3 Example: good:fine#excellent#great Note that each word will consist of max of three synonyms only. You will have to create a hash table to store the words and use words as the keys. 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 word (from both tables). 7. Compare between the two methods in terms of number of collisions occurred. Here you have to print the number of collisions occurred (if happened) once every new word is inserted. 8. Save hash table back to a file named saved_words.txt (of the double hashing)
Expert Answer:
Answer rating: 100% (QA)
Youve shared an image that outlines the specifications for a project involving the creation and maintenance of a dictionary using Hashing techniques I... View the full answer
Related Book For
Advanced Accounting
ISBN: 978-0077431808
10th edition
Authors: Joe Hoyle, Thomas Schaefer, Timothy Doupnik
Posted Date:
Students also viewed these programming questions
-
A high-paying job that you rally want. Include sufficient detail to demonstrate you have a solid understanding of the concepts and you can explain your thinking very well. What factors should you...
-
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...
-
Harry Daffodil is a 3 rd year accounting student at Kwantlen and also works part - time as a bookkeeper for a plant store in Surrey. He would like you to prepare his 2 0 2 1 tax return and has...
-
R and Q form equal partnership RQ on February 15. Partner R has a tax year ending on July 31, whereas partner Qs tax year ends on October 31. What taxable year must the partnership use? a. February...
-
Based on the formula for investor satisfaction or "utility," which investment would you select if you were risk averse with A = 4? Investor "satisfaction" with portfolio increases with expected...
-
Regal Industries is replacing a grinder purchased 5 years ago for P15,000 with a new one costing P25,000 cash. The original grinder is being depreciated on a straight-line basis over 15 years to a...
-
The following is the stockholders' equity of Laker Corporation at January 1: The following transactions, among others, occurred during the year: Jan. 15 Issued 2,000 shares of preferred stock for...
-
Below are financial statements that have been reformulated using the templates in this chapter. Some items are missing; they are indicated by capital letters. a. Supply the missing numbers using the...
-
Y9 How do the principles of Enterprise Architecture and risk from CP 6 and CP 7 apply to Cloud Computing? Please elaborate and give 3 different answers
-
In 2023, Wilma Ways sole proprietorship, WW Bookstore, generated $120,000 net profit. In addition, Wilma recognized a $17,000 Section 1231 gain on the sale of business furniture. The business...
-
The frequency polygon below shows the one-way distance traveled to and from work by a sample of 88 city residents. What percent of the residents commute between 20 and 40 miles each way to and from...
-
. Consider water contained in a cylinder at 15C with a frictionless piston with some weights on it. Initially the pressure inside the piston is 100kPa and then the water is heated such that the water...
-
Suppose Maizey Mayhem has 1 million shares of $5 par common stock outstanding. It then declares a stock dividend of the outstanding shares when the market price is $30 per share. What is the debit to...
-
Grace wants to give her daughter $150,000 in 4 years to start her own business. She currently has $50,000 invested and earmarked for this goal. How much more should she invest at the end of each...
-
Find X, Y, Z and W. [*7 (2x-1)] = [(24-5 (w+1) (3x+4)] EX Z = = =M
-
Many employees, rather than losing their jobs, would find any way to meet those goals. Why are the standards of ethical behavior in business no different from ethical standards in general?
-
Ramco industries choose the best asst from the following two alternatives assets for investment purpo investment is decided to be $110 million mobilized from both debt and equity sources in equal...
-
Akramin just graduated with a Master of Engineering in Manufacturing Engineering and landed a new job in Melaka with a starting salary of RM 4,000 per month. There are a number of things that he...
-
What is the total of consolidated cost of goods sold? a. $140,000. b. $152,000. c. $132,000. d. $145,000. Use the following data for problem: On January 1, Jarel acquired 80 percent of the...
-
An art display set up for the community was recorded within the General Fund and generated revenues of $9,000 but had expenditures of $45,000 ($15,000 in expenses and $30,000 to buy land for the...
-
DeMilo, Inc., owns 100 percent of the 40,000 outstanding shares of Ricardo, Inc. DeMilo currently carries the Investment in Ricardo account at $490,000 using the equity method. Ricardo issues 10,000...
-
Which of the following is usually not found on a job order cost sheet? a. Manufacturing overhead b. Finished units currently on hand c. Direct materials d. Unit cost Never
-
Which of the following is not one of the categories of cost involved in the allocation of service department costs? a. Service department costs allocated to production departments b. Costs directly...
-
Which of the following would be a reason for choosing to use departmental overhead rates, instead of a single company-wide overhead rate? a. Each departments overhead is structured very different...
Study smarter with the SolutionInn App