Contect Management System Project
Contect Management System Project
on
“CONTACT MANAGEMENT SYSTEM”
Submitted in Partial fulfilment of requirement for the awards of degree of
BACHELOR OF TECHNOLOGY
IN
2018 - 2022
Submitted To Submitted By
Ms. Bhawna Sharma Ayanava Dey
Lecturer, Dept. of CSE (18-cse-33)
Sougata Pal
(18-cse-34)
Subrata Pradhan
(18-cse-35)
The support and encouragement given from my family and my friends was
needed most, during the project execution. I am really thankful to them. And
Lastly I would like to thank each and Every person who helped me directly or
indirectly for the successful completion of this project.
AYANAVA DEY
(18-cse-33)
SOUGATA PAL
(18-cse-34)
SUBRATA PRADHAN
(18-cse-35)
BMCTM, Gurgaon
CANDIDATE’S DECLERATION
I hereby state that the work which is presented in this report entitled
" CONTECT MANAGEMENT SYSTEM " by Ayanava Dey (18-CSE-
33), Sougata Pal (18-CSE-34), Subrata Pradhan (18-CSE-35), for the
fulfilment of requirement for Award of the degree of Bachelor of
Technology in Computer Science and Engineering submitted to Dept. of
CSE, BM College of Technology and management, Farukhnagar is a
record of an authentic work carried out During the period from Feb 2022 to
June 2022 under the supervision of Mrs. Bhawna Sharma
AYANAVA DEY
(18-cse-33)
SOUGATA PAL
(18-cse-34)
SUBRATA PRADHAN
(18-cse-35)
BMCTM, Gurgaon
This is to certify that above statement made by candidate is correct to the best of
my knowledge and belief.
(Project Guide)
6. Source code
7. Result
ABSTRACT
Much of our daily communication activity involves managing
interpersonal communications and relationships. Despite its
importance, this activity of contact management is poorly understood.
We report on field and lab studies that begin to illuminate it. A field
study of business professionals confirmed the importance of contact
management and revealed a major difficulty: selecting important
contacts from the large set of people with whom one communicates.
These interviews also showed that communication history is a key
resource for this task. Informants identified several history-based
criteria that they considered useful. We conducted a lab study to test
how well these criteria predict contact importance. Subjects identified
important contacts from their email archives. We then analyzed their
email to extract features for all contacts. Reciprocity, recency and
longevity of email interaction proved to be strong predictors of
contact importance. The experiment also identified another contact
management problem: removing ‘stale’ contacts from long term
archives. We discuss the design and theoretical implications of these
results.
1.1 INTRODUCTION
2.2 Contact Selection. When someone calls you on the phone, leaves
you voicemail, sends you email, or hands you a business card, what
do you do? Do you record their contact information or not? The
difficulty is that it is hard to anticipate whether, and to what extent,
you will need
to communicate with that person in the future. Whether someone is
an “important contact” only becomes clear over time. The ease of
electronic communication, especially the ability to broadcast
messages to large numbers of people at little cost, exacerbates this
problem: you may be cc’ed on messages, get email from various
distribution lists, or receive mass mailings. To be safe, our informants
often “over-saved” information, leading to huge rolodexes,
overflowing booklets of business cards, and faded post-it notes
scattered around their work areas. Despite this strategy, participants
were still exposed to many more contacts than they recorded
information about. One reason for this was the laborious nature of
recording contact information.
Hardware Specification
Software Specification.
#include<conio.h>
#include<string.h>
#include<stdlib.h>
#include"data.h"
#include"search.h"
void main()
void add_contact();
void delete_contact();
void list_contacts();
void edit_contact();
void search_contact();
void change_password();
char pass[30],ch,original[30],choice;
int i;
FILE *fp;
window(1,1,80,25);
textbackground(YELLOW);
clrscr();
window(20,10,60,15);
textbackground(BLACK);
clrscr();
gotoxy(4,3);
textcolor(RED+BLINK);
i=0;
while(1)
ch=getch();
{ pass[i]='\0';
break;
pass[i++]=ch;
printf("*");
fp=fopen("key.dat","r");
fgets(original,30,fp);
fclose(fp);
if(!strcmp(original,pass)==0)
{
gotoxy(4,3);
textcolor(WHITE+BLINK);
getch();
exit(0);
else
window(1,1,80,25);
textbackground(11);
clrscr();
gotoxy(32,3);
textcolor(RED);
cprintf("CONTACT MANAGER");
gotoxy(33,6);
textcolor(BLUE);
gotoxy(18,9);
textcolor(181);
gotoxy(5,15);
textcolor(BLUE);
for(i=1;i<=50;i++)
cprintf("%c",219);
delay(200);
while(1)
textbackground(YELLOW);
clrscr();
window(18,5,60,22);
textbackground(BLACK);
clrscr();
textcolor(11);
gotoxy(18,2);
cprintf("MAIN MENU");
gotoxy(16,3);
cprintf("-------------");
textcolor(WHITE);
gotoxy(12,5);
gotoxy(12,6);
cprintf("2. Delete Contact");
gotoxy(12,7);
gotoxy(12,8);
gotoxy(12,9);
gotoxy(12,10);
gotoxy(12,11);
cprintf("7. Exit");
gotoxy(5,12);
cprintf("---------------------------------");
gotoxy(12,14);
textcolor(YELLOW+BLINK);
choice = getche();
switch(choice)
case '1':
add_contact();
break;
case '2':
delete_contact();
break;
case '3':
edit_contact();
break;
case '4':
search_contact();
break;
case '5':
list_contacts();
break;
case '6':
change_password();
break;
case '7':
exit(0);
getch();
}
int getsno()
FILE*fp;
int n,size;
fp=fopen("info.dat","rb");
size=sizeof(cont);
fseek(fp,-size,SEEK_END);
fread(&cont,sizeof(cont),1,fp);
n=cont.sno;
fclose(fp);
n++;
return(n);
void add_contact()
FILE *fp;
window(1,1,80,25);
textbackground(233);
textcolor(26);
clrscr();
printf("-----------------------------------------------------------------");
fflush(stdin);
cont.sno=getsno();
printf("\nSerial No : %d",cont.sno);
gets(cont.category);
fflush(stdin);
gets(cont.name);
fflush(stdin);
scanf("%c",&cont.gender);
fflush(stdin);
scanf("%d",&cont.age);
fflush(stdin);
gets(cont.address);
fflush(stdin);
gets(cont.number);
fflush(stdin);
fp=fopen("info.dat","ab");
fwrite(&cont,sizeof(cont),1,fp);
fclose(fp);
textcolor(WHITE+BLINK);
getch();
void delete_contact()
char choice;
int n,found;
FILE *fp1,*fp2;
window(1,1,80,25);
textbackground(BLACK);
textcolor(YELLOW);
clrscr();
printf("Delete Contact");
printf("\n----------------------------------------------------------------");
scanf("%d",&n);
fp1=fopen("info.dat","rb");
found=0;
while(fread(&cont,sizeof(cont),1,fp1)!=NULL)
if(cont.sno==n)
{
printf("\nCategory :
%s",cont.category);
printf("\nName :
%s",cont.name);
printf("\nGender :
%c",cont.gender);
printf("\nAge :
%d",cont.age);
printf("\nAddress :
%s",cont.address);
printf("\nContact No :
%s",cont.number);
printf("\n------------------------
--------------------------------------");
found=1;
break;
if(found==0)
textcolor(RED+BLINK);
printf("\n");
fclose(fp1);
return;
}
choice=getche();
if(choice=='Y' || choice=='y')
rewind(fp1);
fp2=fopen("temp.dat","wb");
while(fread(&cont,sizeof(cont),1,fp1)!=NULL)
if(cont.sno!=n)
fwrite(&cont,sizeof(cont),1,fp2);
fclose(fp1);
fclose(fp2);
remove("info.dat");
rename("temp.dat","info.dat");
textcolor(GREEN+BLINK);
printf("\n");
getch();
}
void edit_contact()
FILE *fp;
int n,pos,found;
window(1,1,80,25);
textcolor(YELLOW);
textbackground(BLACK);
clrscr();
printf("Edit Contact");
printf("\n---------------------------------------------------------------");
scanf("%d",&n);
fp=fopen("info.dat","r+b");
found=0;
while(fread(&cont,sizeof(cont),1,fp)!=NULL)
if(cont.sno==n)
found=1;
printf("\nCategory :
%s",cont.category);
printf("\nName :
%s",cont.name);
printf("\nGender :
%c",cont.gender);
printf("\nAddress :
%s",cont.address);
printf("\nAge :
%d",cont.age);
printf("\nContact No :
%s",cont.number);
break;
if(found==0)
printf("\n");
textcolor(RED+BLINK);
fclose(fp);
getch();
return;
pos=ftell(fp);
fseek(fp,pos-sizeof(cont),SEEK_SET);
fflush(stdin);
gets(cont.name);
fflush(stdin);
scanf("%c",&cont.gender);
fflush(stdin);
scanf("%d",&cont.age);
fflush(stdin);
gets(cont.address);
fflush(stdin);
gets(cont.number);
fflush(stdin);
fwrite(&cont,sizeof(cont),1,fp);
fclose(fp);
printf("\n");
textcolor(GREEN+BLINK);
getch();
}
void search_contact()
char ch;
window(1,1,80,25);
textbackground(BLACK);
textcolor(11);
clrscr();
textcolor(GREEN);
cprintf("SEARCH OPTIONS");
printf("\n");
printf("------------------------------------------------------------------");
printf("\n-----------------------------------------------------");
textcolor(YELLOW+BLINK);
printf("\n");
ch=getche();
switch(ch)
{
case '1':
search_sno();
break;
case '2':
search_category();
break;
case '3':
search_name();
break;
case '4':
search_phone();
break;
case '5':
return;
void list_contacts()
FILE *fp;
int i;
window(1,1,80,25);
textbackground(BLACK);
textcolor(51);
clrscr();
gotoxy(34,1);
printf("--LIST OF CONTACTS--");
printf("\n");
for(i=1;i<=80;i++)
printf("-");
gotoxy(1,3);
printf("S.NO");
gotoxy(8,3);
printf("CATEGORY");
gotoxy(20,3);
printf("NAME");
gotoxy(30,3);
printf("GENDER");
gotoxy(40,3);
printf("AGE");
gotoxy(47,3);
printf("ADDRESS");
gotoxy(60,3);
printf("PHONE NO");
printf("\n");
for(i=1;i<=80;i++)
printf("-");
fp=fopen("info.dat","rb");
i=5;
while(fread(&cont,sizeof(cont),1,fp)!=NULL)
gotoxy(1,i);
printf("%d",cont.sno);
gotoxy(8,i);
printf("%s",cont.category);
gotoxy(19,i);
printf("%s",cont.name);
gotoxy(32,i);
printf("%c",cont.gender);
gotoxy(41,i);
printf("%d",cont.age);
gotoxy(47,i);
printf("%s",cont.address);
gotoxy(60,i);
printf("%s",cont.number);
i++;
fclose(fp);
textcolor(RED+BLINK);
printf("\n");
getch();
void change_password()
FILE *fp;
char current[30],original[30],newpass[30],confirm[30];
window(1,1,80,25);
textbackground(WHITE);
textcolor(BLACK);
clrscr();
printf("Change Password");
printf("\n----------------------------------------------------------------");
gets(current);
fp=fopen("key.dat","r");
fgets(original,30,fp);
fclose(fp);
if(strcmp(current,original)!=0)
textcolor(RED);
cprintf("\nIncorrect Password
, Press any Key...");
getch();
return;
gets(newpass);
gets(confirm);
if(strcmp(confirm,newpass)!=0)
getch();
return;
fp=fopen("key.dat","w");
fprintf(fp,"%s",newpass);
textcolor(GREEN);
getch();
}
6.2 Search.h file :-
void search_sno()
{
FILE *fp;
int n,found;
textcolor(YELLOW);
clrscr();
printf("Enter the Serial No :");
scanf("%d",&n);
fp=fopen("info.dat","r");
found=0;
while(fread(&cont,sizeof(cont),1,fp)!=NULL)
{
if(cont.sno==n)
{
printf("\nCategory :
%s",cont.category);
printf("\nName : %s",cont.name);
printf("\nGender : %c",cont.gender);
printf("\nAge : %d",cont.age);
printf("\nAddress : %s",cont.address);
textcolor(GREEN);
cprintf("\nSuccessfully Search , Press any
Key...");
found=1;
break;
}
}
if(found==0)
{
printf("\nNot Found , Press any Key...");
getch();
return;
}
getch();
}
void search_category()
{
char cat[20];
FILE *fp;
int i;
window(1,1,80,25);
textbackground(WHITE);
textcolor(BLACK);
clrscr();
printf("Enter Category :");
gets(cat);
gotoxy(34,1);
printf("\n");
for(i=1;i<=80;i++)
printf("-");
gotoxy(1,3);
printf("S.NO");
gotoxy(8,3);
printf("CATEGORY");
gotoxy(20,3);
printf("NAME");
gotoxy(30,3);
printf("GENDER");
gotoxy(40,3);
printf("AGE");
gotoxy(47,3);
printf("ADDRESS");
gotoxy(60,3);
printf("PHONE NO");
printf("\n");
for(i=1;i<=80;i++)
printf("-");
fp=fopen("info.dat","rb");
i=5;
while(fread(&cont,sizeof(cont),1,fp)!=NULL)
{
if(strcmpi(cat,cont.category)==0)
{
gotoxy(1,i);
printf("%d",cont.sno);
gotoxy(8,i);
printf("%s",cont.category);
gotoxy(19,i);
printf("%s",cont.name);
gotoxy(32,i);
printf("%c",cont.gender);
gotoxy(41,i);
printf("%d",cont.age);
gotoxy(47,i);
printf("%s",cont.address);
gotoxy(60,i);
printf("%s",cont.number);
i++;
}
}
fclose(fp);
textcolor(RED+BLINK);
printf("\n");
cprintf("Press any Key...");
getch();
}
void search_name()
{
char nam[20];
FILE *fp;
int i;
window(1,1,80,25);
textbackground(WHITE);
textcolor(BLACK);
clrscr();
printf("Enter Name :");
gets(nam);
gotoxy(34,1);
printf("\n");
for(i=1;i<=80;i++)
printf("-");
gotoxy(1,3);
printf("S.NO");
gotoxy(8,3);
printf("CATEGORY");
gotoxy(20,3);
printf("NAME");
gotoxy(30,3);
printf("GENDER");
gotoxy(40,3);
printf("AGE");
gotoxy(47,3);
printf("ADDRESS");
gotoxy(60,3);
printf("PHONE NO");
printf("\n");
for(i=1;i<=80;i++)
printf("-");
fp=fopen("info.dat","rb");
i=5;
while(fread(&cont,sizeof(cont),1,fp)!=NULL)
{
if(strcmpi(nam,cont.name)==0)
{
gotoxy(1,i);
printf("%d",cont.sno);
gotoxy(8,i);
printf("%s",cont.category);
gotoxy(19,i);
printf("%s",cont.name);
gotoxy(32,i);
printf("%c",cont.gender);
gotoxy(41,i);
printf("%d",cont.age);
gotoxy(47,i);
printf("%s",cont.address);
gotoxy(60,i);
printf("%s",cont.number);
i++;
}
}
fclose(fp);
textcolor(RED+BLINK);
printf("\n");
cprintf("Press any Key...");
getch();
}
void search_phone()
{
char ph[15];
FILE *fp;
int i;
window(1,1,80,25);
textbackground(WHITE);
textcolor(BLACK);
clrscr();
printf("Enter Number:");
gets(ph);
gotoxy(34,1);
printf("\n");
for(i=1;i<=80;i++)
printf("-");
gotoxy(1,3);
printf("S.NO");
gotoxy(8,3);
printf("CATEGORY");
gotoxy(20,3);
printf("NAME");
gotoxy(30,3);
printf("GENDER");
gotoxy(40,3);
printf("AGE");
gotoxy(47,3);
printf("ADDRESS");
gotoxy(60,3);
printf("PHONE NO");
printf("\n");
for(i=1;i<=80;i++)
printf("-");
fp=fopen("info.dat","rb");
i=5;
while(fread(&cont,sizeof(cont),1,fp)!=NULL)
{
if(strcmp(ph,cont.number)==0)
{
gotoxy(1,i);
printf("%d",cont.sno);
gotoxy(8,i);
printf("%s",cont.category);
gotoxy(19,i);
printf("%s",cont.name);
gotoxy(32,i);
printf("%c",cont.gender);
gotoxy(41,i);
printf("%d",cont.age);
gotoxy(47,i);
printf("%s",cont.address);
gotoxy(60,i);
printf("%s",cont.number);
i++;
}
}
fclose(fp);
textcolor(RED+BLINK);
printf("\n");
cprintf("Press any Key...");
getch();
}
6.3 Data.h file :-
struct contact
{
int sno;
char category[20];
char name[20];
char gender;
int age;
char address[50];
char number[10];
}cont;
7. Result :-
Main Menu :-
Add New Contact Screen :-