Question: C++ Description: For this assignment you will create a program to manage phone contacts. Your program will allow the user to add new phone contacts,
Description: For this assignment you will create a program to manage phone contacts. Your program will allow the user to add new phone contacts, display a list of all contacts, scarch for a specific contact by name, delete a specific contact. Your program should provide the user with a console or command line choice menu about possible actions that they can perform. The choices should be the following 1. Display list of all contacts. 2. Add a new contact. 3. Search for a contact given the contact's first or last name 4. Delete a contact. 5. Exit program. To represent a contact in your program, create a struct named Contact with the following fields firstName string lastName string phoneNumber long phone Type- enum PhoneType The Phone Type can be only one of the following: "CELL", "HOME", "WORK" When the program first loads, it reads all the saved contacts (if any) from a file named database.txt into an Array or Vector. While the program is running, the user can choose any of the 5 available options. When the user selects the option 5 (exit program), the program stores the current contents of the Array or Vector to the file (replacing the old contents) and exits. During the program execution, if the user chooses to add or delete items, only the Array or Vector will be updated. The database.txt file will be updated automatically only when the is about to exit. In other words, when the user selects option 5, the program first saves all the contents of the Array or Vector into the text file, and then exits
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
