Copyright ©  T. H. Merrett

308-420A          Secondary Storage Algorithms and Data Structures        Week 2

                                  Assignment 2

    Write a Java program which searches the telephone book AS A SEQUENTIAL FILE
			( /course/cs420/data/tbook )
for one name and three telephone numbers (four queries), printing out the
whole record whenever the search is successful. The name and numbers to be
sought should be read from the terminal by your program.

    Your program should be efficient: think about what is the most expensive
part of the process of retrieving data from secondary storage, and minimize the
number of times you do this part.

    Use vi on the input file to find some names and numbers to test your program
for successful searches. Do not forget to test it for unsuccessful searches.

    Hand in the listing and the printouts from both successful and unsuccessful
searches.


Optional: change your program to use internet sockets via HostClient, as you
did with Assignment 1. Compare the running times. Try this from home.

Shared marks for shared work: assignments should be your own work; marks
for joint assignments will be divided by the number of collaborators.
But please feel free to work in groups to learn or for extra work that
is not for marks.