GRAND RAPIDSCOMMUNITY COLLEGE

COMPUTER APPLICATIONS

Assignment

 

Concepts and Ideas

Template – Standard Template Library

C0-227 C++ PROGRAMMING

 

PROJECT PHONE LIST

 

DIVISION

 MAP

 

Assignment

I want you to write a program that reads a text file containing a phone book listing.  The program

shall read the file, allow new entries, and write the file to disk such that you can extend the text

file as people enter new data.

 

Supplied Items:

1. ReadWrite Project with the MailList class demonstrating reading and writing of the text files.

2. Simple MAP demonstrating the use of a STL MAP.  The notes give a good explanation of the

Simple MAP program.

3. Address.txt file that contains a starter list for your phone book.

4. MSDN Function Help handout that may help with some of the io functions.

 

Tasks To Do:

1. Start off looking over the projects, reviewing them and understanding them as much as

possible.  This will be done in class.

2. Generate a new project called PhoneBook.

3. Add the MailList class to your PhoneBook project.

4. Copy the file io functions to read in the data (address.txt) and fill the array.

5. The problem with the io functions are that they use an array.  This will be a problem when

you start adding a bunch of people to your phonebook.  So you need to use the example

SimpleMap program code to implement the STL MAP into your project in place of the array.

6. Once you can read the file, put it into your MAP, and write the file from your MAP, put

together a user interface giving the option to query the database for a name to get the

number, or add entries. 

7. Query means that the user types in a name, the MAP finds the number and returns it. 

8. Add information simply means that the user is asked for name, number, address, etc. and a

new entry is entered into the map.

9. When the user wants to quit, the contents of the map is saved to file.

 

 

 

 

    • 10 years ago
    A+ Work
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      phonebook.zip