Professional Documents
Culture Documents
Contact Management System: Project
Contact Management System: Project
Contact Management System: Project
CONTACT MANAGEMENT
SYSTEM
CODE:
#include<iostream>
#include<string>
//Add operation
int Add(int& size)
{
int choice;
char ch;
do
{
}
size = size + choice;
cout << "Do you want more inputs press Y/N : \n";
cin >> ch;
} while (ch == 'y');
return 0;
}
//Display data
int show(int& size)
{
//heading
cout << "|-------------------------------------------------------------------|\n";
cout << "|Sn.|\t|NAme\t\t\t\t|Phone Number|\t\t |\n";
cout << "|-------------------------------------------------------------------|\n";
//Display of entred data
for (int i = 0; i < size; i++)
{
cout << "|" << i + 1 << ")|";
cout << "\t";
cout << Array[i].First_name << " ";
cout << Array[i].Last_name;
cout << "|\t\t\t|";
for (int j = i; j <= i; j++)
{
cout << Array[j].Phone_number;
}cout << endl;
}return 0;
}
//Searching data in directory
int Search(int& size)
{
int choice;
do
{
}size--;
cout << "Press 1 for more change\n";
break;
case 2:
cout << "Enter full number in which you want to change\n";
cin >> P_number;
for (int i = 0; i < size; i++)
{
if (Array[i].Phone_number == P_number)
{
int choice;
int size = 0;
//heading
cout << "\t\t\
t-------------------------------------------------------------------";
cout << "\t\t\t\t\t\t\t\t\tWELCOME TO YOUR CONTACT MANAGEMENT SYSTEM\n"; \
cout << "\t\t\
t-------------------------------------------------------------------\n";
//background colour
do
{
//choices
cout << "1) Add rew record\n";
cout << "2) Display all record\n";
cout << "3) Search contact number \n";
cout << "4) Update data \n";
cout << "5) Delete record \n";
cout << "Entre your choice for operation :\n";
cin >> choice;
switch (choice)
{
case 1:
Add(size);
break;
case 2:
show(size);
break;
case 3:
Search(size);
break;
case 4:
Modify(size);
break;
case 5:
Delete(size);
break;
default:
cout << "Input invalid\n";
}
cout << "Press 0 to go to main program...!\n";
cin >> choice;
system("cls");
} while (choice == 0);
return 0;
}