CSC 175 - Intermediate Programming

Dr. R. M. Siegfried

Assignment #14 - Creating a Phonebook

Due Friday, March 15, 2024

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

The properties will be public, and it should have two constructors: one that 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 how many records there actually are. The number of records is passed to it by the constructor 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 Assignments List]