Phase 1: Contact Management System
Introduction:
The Contact Management System is a console-based application developed in C++. The system aims to manage contacts using structures to store information about each contact, including a unique ID, name, phone number, email, and address. The project utilizes functions to perform essential operations like adding contacts, sorting them by name, searching for a contact by name, and displaying contacts based on various criteria.
Structures Used:
Address Structure:
- street [string]
- city [string]
- state [string]
- postalCode [string]
Contact Structure:
- id [int]
- name [string]
- phoneNumber [string]
- email [string]
- address [Address structure]
Your system must have at least these functions:
- readContactsFromFile: Reads contact information from a file named "contacts.txt" into the system.
- writeContactsToFile: Writes all contact information from the system into a file named "contacts.txt".
- displayContact: Displays detailed information about a specific contact.
- displayAllContacts: Displays information for all stored contacts.
- readContact: Reads input from the user to create a new contact.
- addContact: Adds a new contact to the system.
- sortContactsByName: Sorts contacts alphabetically by name.
- searchContactByName: Searches for a contact by name and returns its ID.