Fifth Assignment

Due Tuesday 2nd April

Electronic Submission

This is another extension on the first three assignments. You already have a program that sorts the database of people in alphabetical order of names, so that a fast binary chop search can be used. Unfortunately, when the data is sorted on names, a fast search based on phone numbers is not also possible.

For this assignment you must make it possible to perform fast binary chop searches based on both name and phone number. The data should be sorted both ways when the file is first read, not re-sorted before each search.

Of course, this requires you to set up separate arrays of pointers to the original data objects, and make a sorting function that re-orders the pointers instead of re-ordering the original array of data.