1. Design code (object-oriented if you wish, but not required) for processing a hash table with the following specificat

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899559
Joined: Mon Aug 02, 2021 8:13 am

1. Design code (object-oriented if you wish, but not required) for processing a hash table with the following specificat

Post by answerhappygod »

1. Design code (object-oriented if you wish, but not required)
for processing a hash table with the following specifications:
The records involved simply contain a
person’s name (up to 40 characters) and a three-digit integer key
(so, 000 to 999).
The tableSize is to be 19. An array
implementation should be used.
Your code must provide operations for
inserting a record into the table, deleting a record from the
table, searching for a given record (if the record is found, report
the position in which
it was found; otherwise report the
failure), building the table from a text file, and displaying a
list of the contents of the entire table (including “empty”
locations). If a text file is used,
each line of the mfile should contain a
name in columns 1 to 40 and a 3-digit integer beginning in column
41 (or later).
The user of the program should be
given the option of using linear probing, quadratic probing, or
double hashing (with the quotient from key / tableSize used as the
secondary hash
function) for collision resolution.
1.1 Write a driver program to test your code. The program should
be menu-driven, with options for each of the above operations (and
for exit). The program should execute until the user chooses to
exit.
Note: Your program should report the
status (success or failure) of insertions and deletions. For
insertions, deletions, and searches, the program should list all
positions that were
tested, to verify that probing was working
properly.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply