CSC 172-Introduction to Algorithms and Data Structures

Dr. R. M. Siegfried

Assignment #7 - Creating a Phone Book

Due Friday, March 14, 2014

You are going to create a PhoneRecord class containing the following properties:

the properties will be public, and it should have two constructors: one which simply constructs the string and another that accepts values for first name, lastname and phone number.

You should also create a class called Phone Book. It should contain an array of Phone Records and a count of howmany records there actually are. The number of records is passed to it by the contructor call, i.e.,:
PhoneBook pb = new PhoneBook(3);
will construct a phone book that can contain up to 3 listings.

The methods are:

Write another class that uses the phone book, obtaining its size as a command line argument. Read in several records, write one or two of them and write the whole phone book.

[Back to the Assignment Index]