This is a free form programming assignment where you are: Required to create a simple phone book application Asked to make a choice of appropriate data structure and implementation. Defend your selection and explain the efficiency of your program using Big(O) notation. You do not need to create data structures from scratch. You are free to use data structures available in the standard template C++ library. For example std::stack or std::set , std::maps, etc. You have familiarity with these from your Code Step by Step labs. You are not permitted to use simple arrays. Specifications Create a phone book program that stores and manages contact information. Contact information is name and corresponding phone number. The program reads this information for multiple contacts from a data file “contacts.txt” and saves them in a suitable data structure. Once the data is stored, it allows the user to display all contacts, add a single contact, remove a contact, update a contact, or populate more contacts from a file called “update.txt” It offers a menu with the following options: 1. D : Display all contacts in aphabetic order (sorted by first name) 2. A : Add a contact (user enters the name and phone number from console) 3. R : Remove a contact (user enters the name from console) 4. C: Change contact information (user enters the name and new phone number from console) 5. U: Reads a list of contacts from the “update.txt” file into the existing database 6. Q: Quits the applications Duplicate names are not allowed. If user tries to add a name already there, then no overriding is done. Same for update. But the ‘C’ change function can be used to change the phone number of an existing contact.
This is a free form programming assignment where you are:
Required to create a simple phone book application
Asked to make a choice of appropriate data structure and implementation.
Defend your selection and explain the efficiency of your program using Big(O) notation.
You do not need to create data structures from scratch. You are free to use data
structures available in the standard template C++ library. For example std::stack<int> or
std::set<int> , std::maps<int,int>, etc. You have familiarity with these from your Code
Step by Step labs. You are not permitted to use simple arrays.
Specifications
Create a phone book program that stores and manages contact information.
Contact information is name and corresponding phone number. The program reads this
information for multiple contacts from a data file “contacts.txt” and saves them in a
suitable data structure. Once the data is stored, it allows the user to display all contacts,
add a single contact, remove a contact, update a contact, or populate more contacts
from a file called “update.txt”
It offers a menu with the following options:
1. D : Display all contacts in aphabetic order (sorted by first name)
2. A : Add a contact (user enters the name and phone number from console)
3. R : Remove a contact (user enters the name from console)
4. C: Change contact information (user enters the name and new phone number
from console)
5. U: Reads a list of contacts from the “update.txt” file into the existing database
6. Q: Quits the applications
Duplicate names are not allowed. If user tries to add a name already there, then no
overriding is done. Same for update. But the ‘C’ change function can be used to change
the phone number of an existing contact.



Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 11 images









