CSC 270-Survey of Programming Languages

Dr. R. M. Siegfried

Assignment #13 - Creating a Phone Book

Due Wednesday, November 15, 2017

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

the properties will be private, and it should have two constructors: one which simply constructs the string and another that accepts values for first name, lastname and phone number. Also write accessors and mutators for all three properties. They should ensure that first and last names begin with a capital letter.

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 implicit contructor call when you declare the object, i.e.,:
PhoneBook pb(3);
will construct a phone book that can contain up to 3 listings.

The methods are:

Write a main program and subsidiary functions that use 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.

These classes shold all be in separate files, with a header file (.h) and a source file (.cpp) for each.

[Back to the Assignment Index]