LAB 9:  Due 11:59 pm, Mon Nov 15

Submit the link to your project to Moodle before the deadline. Do Not modify after the deadline.


I) Programming Project 4 on page 530. In part a), use the formula (a*m+i*b) % 100,000 for i from 0 to 999 and a = 47, m = 2743, and b = 5923 to fill the array with 1000 "random" numbers less than 100,000. Also add another part to part c: c-iii Use the plain sequential search to search for an item and also count the number of comparisons for the sequential search. You can use STL sort algorithm.

II) Programming Project 8 on page 531. To test your program, read the input from the following file in Google drive:     FilesForLabs\states.txt

After reading info about each state, insert it to the hash table.Give the user the option of searching for a state (by name) or deleting a state from the list. Let the user repeat as long as they wish. Use a hash table of size 101 (which is the default size in the implementation given in the book) Note: The mixing of operator >> and getline function may cause problems with reading the data correctly. Use .ignore( ) function appropriately to avoid the problem.