|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (2 bit)
|
Could someone please help me with this assignment(!??!!!
):Problem Statement: The NBA basketball players have decided to start a scholarship fund using the proceeds from their upcoming All-Star game. Develop a menu-driven program to maintain a list of their scholarship recipients. Your program should maintain the awardees in a hash table and should have a menu similar to the following: 1. Add a new awardee 2. Remove an awardee 3. Show an awardee's information 4. Show the entire list of awardees in alphabetical order 5. QUIT Option 1 means the program will insert an awardee into the hash table. Use the person's social security number as the key. Hash the key by using the first four digits in the social security number. Hash(SSN) = (first four digits) mod CAPACITY For example, Hash(358761263) = 3587 mod 100 = 87. Therefore the record with social security number 358761263 will be placed in array position 87. For Option 2 the program must locate the awardee (by hashing) and then must delete the awardee's record from the hash table. Remember, you must locate the awardee by hashing, not by doing a sequential search from the beginning of the hash table. For Option 3 the program will locate the awardee (by hashing) and then display the awardee's information (name, ssn, school, etc). Option 4 means display the information for every awardee in the hash table in alphabetical order. To do this you must place every entry into a separate array and then sort the array. Use either of the sorts we discussed in class (Bubble, Insertion, Selection, QuickSort, MergeSort, ShellSort, Radix). The original hash table remains unchanged. Use the HashTable class we discussed in class along with the following definition for RecordType. Remember, the the social security number is the key. struct RecordType { char firstname[30]; char lastname[30]; char ssn[9]; char school[30]; char phone[12]; }; |
|
|
|
|
#2 |
|
Forum Administrator
Staff
Premium Member
Join Date: May 2000
Location: Joplin MO
Posts: 37,777
|
Please do not double post.
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|