CSc 330 – Object-Oriented Design & Programming in C++

Professor Domanski - Telephone Directory

Download the datafile (dir.txt)

Download/Open a non-GUI demo

 

Download/Open the datafile for the GUI

Download/Open a GUI demo

Design and implement a C++  class to model a telephone directory for a company.  The directory should contain space for up to 100 names, phone numbers, birthday, and room numbers (where the first digit of the room number is the floor).  You should have functions to do the following:

 

 

Input

Each line of the input file (called “dir.txt” which should be in the same directory as the running program) is in the following format:

 

For example:

JOHNSON     JAMES L     4103332222  315   1 31 1975

 

Create a simple GUI that will allow the user to

 

You should allow the user to pick from the following options:

  1. Find an entry corresponding to a given last name or first name
  2. Display all the telephone directory information
  3. Add a new entry to the directory
  4. Display the names of all the people with the same birth month
  5. Display the names of all the people with the offices on the same floor

 

Notes

  1. You must use classes.
  2. You may want to use structures within classes, or classes within classes (ie. Friend classes)
  3. All submissions are expected to be individual work.  All work handed in must be original. Duplicate or very similar programs receive no points.

 

Time for Completion: :        3 weeks

Last Updated:                    April 10, 2006