Address
Address
TOPIC:-ADDRESS BOOK
Submitted TO:- Submitted by:-
Roll No:-R246A23
Section:-246
Regd. No:-10805254
1
ACKNOWLEDGEMENT
ANKUR
2
Table of contents
1. Introduction
2. Proposed system
i. Description
ii. System requirements
3. Requirement Analysis
4. System Design
5. Source code
6. Testing
7. Future scope of project
3
INTRODUCTION
As the name specifies "Address book" is a software developed for managing various
details of persons.
Through this address book we can handle the details of persons properly which can not
be possible to keep in mobile as there are less space in detail section.
This particular project deals with the problems on managing the details of person and
avoids the problems of losing the details.
Identification of the drawbacks of the existing system leads to the designing of computerized
system that will be compatible to the existing system with the system which is more user friendly
and more GUI oriented. We can improve the efficiency of the system, thus overcome the
drawbacks of the existing system.
· Less human error
· Strength and strain of manual labour can be reduced
· High security
· Data consistency
· Easy to handle
· Easy data updating
· Easy record keeping
· Backup data can be easily genera
4
PROPOSED SYSTEM
The following documentation is a project the “Name of the term paper allotted”. It is a detailed
summary of all the drawbacks of the old system and how the new proposed system overcomes
these shortcomings. The new system takes into account the various factors while designing a
new system. It keeps into the account the Economical bandwidth available for the new system.
The foremost thing that is taken care of is the Need and Requirements of the User.
DESCRIPTION
Before developing software we keep following things in mind that we can develop powerful and
quality software
PROBLEM STATEMENT
The system will be user friendly and completely menu driven so that the users shall have no
problem in using all options.
o Helps in saving a large amount of data without the fear of saving it.
o Without the interference of any human, one can easily login and get through the Address
Book.
5
SYSTEM REQUIREMENTS
6
Requirement Analysis:
7
System Design
START
Enter your
choice?
1-9
Sav Delete
New Displa Delet Displa Empt Load
e all
y an e an y an ya End
Entr Entrie Saved
entry book Entr
y Entry Entry s Files
y
Do you want
to continue?
STOP
8
SOURCE CODE
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#include<alloc.h>
#include<string.h>
#include<graphics.h>
struct entry
char name[50];
char nick[50];
char email[50];
char address[50];
char city[50];
char cont[50];
char pin[50];
}*temp,*newe,*l,*r;
void displayall();
void makempty();
int isempty();
void saventry();
void loadentry();
void deleteall();
void newentry()
char a[50],b[50],f[50],g[50],c[50],d[50],e[50];
int i,k=0;
printf("Name :");
scanf("%s",a);
scanf("%s",b);
printf("E-mail ID :");
scanf("%s",c);
printf("Address :");
scanf("%s",d);
printf("City :");
10
scanf("%s",e);
printf("Contact No:");
scanf("%s",f);
printf("Pincode :");
scanf("%s",g);
for(i=0;i<50;i++)
newe->name[i]=' ';
newe->nick[i]=' ';
newe->email[i]=' ';
newe->address[i]=' ';
newe->city[i]=' ';
newe->cont[i]=' ';
newe->pin[i]=' ';
for(i=0;i<50;i++)
newe->name[i]=a[i];
newe->nick[i]=b[i];
newe->email[i]=c[i];
newe->address[i]=d[i];
newe->city[i]=e[i];
11
newe->cont[i]=f[i];
newe->pin[i]=g[i];
if(isempty())
newe->lptr=newe->rptr=NULL;
l=r=newe;
else
temp=l;
while(temp!=NULL)
i=stricmp(newe->name,temp->name);
if(i<0)
break;
else if(i>0)
temp=temp->rptr;
else if(i==0)
k=1;
12
break;
if(k!=1)
if(temp==l)
newe->lptr=NULL;
newe->rptr=l;
l->lptr=newe;
l=newe;
else if(temp==NULL)
newe->rptr=NULL;
newe->lptr=r;
r->rptr=newe;
r=newe;
else
{
13
newe->rptr=temp;
newe->lptr=temp->lptr;
temp->lptr=newe;
(newe->lptr)->rptr=newe;
void displayall()
{ int n=1;
if(!isempty())
temp=l;
while(temp!=NULL)
printf("[%d] Name :%s Nick Name :%s E-mail ID :%s address :%s
City :%s Contact.No:%s Pin code :%s",n,temp->name,temp->nick,temp-
>email,temp->address,temp->city,temp->cont,temp->pin);
temp=temp->rptr;
n++;
14
}
else
int i;
if(isempty())
else{
temp=l;
while(temp!=NULL)
i=stricmp(temp->name,n);
if(i==NULL)
if(l==r)
l=r=NULL;
printf("Entry deleted");
break;
}
15
else if(temp==l)
l=l->rptr;
l->lptr=NULL;
printf("Entry deleted");
break;
else if(temp==r)
r=r->lptr;
r->rptr=NULL;
printf("Entry deleted");
break;
else{
(temp->lptr)->rptr=temp->rptr;
(temp->rptr)->lptr=temp->lptr;
printf("Entry deleted");
break;
temp=temp->rptr;
16
}
if(temp==NULL)
printf("Not Found");
int isempty()
return l==NULL;
void makempty()
l=r=NULL;
int i,p=1;
if(isempty())
else
temp=l;
while(temp!=NULL)
17
{
i=stricmp(temp->name,n);
if(i==NULL)
{if(p==1)
else if(p==2)
else if (p==3)
else
printf("Name :%s Nick Name :%s E-mail ID :%s address :%s City
:%s Contact.No:%s Pin code :%s ",temp->name,temp->nick,temp-
>email,temp->address,temp->city,temp->cont,temp->pin);
break;
temp=temp->rptr;
p++;
if(temp==NULL)
18
}
void main()
int l=1,m;
int gd=DETECT,gm;
char n[50];
initgraph(&gd,&gm,"c:\tc\bgi");
while(l!=8)
clrscr();
textmode(C80);
textcolor(4);
cprintf("************************************************************
********************#------------------------MINI PROJECT-SIMPLE
ADDRESS BOOK----------------------
#*****************************************************************
***************");
printf(" ");
cprintf("(1)-New Entry");
printf(" ");
cprintf("(2)-Display an Entry");
printf(" ");
cprintf("(3)-Delete an Entry");
19
printf(" ");
printf(" ");
printf(" ");
cprintf("(6)-Save Entry");
printf(" ");
cprintf("(7)-Load Entries");
printf(" ");
printf(" ");
cprintf("(9)-End");
printf(" ");
cprintf("************************************************************
********************");
printf(" ");
scanf("%d",&l);
switch(l)
case 1:
textcolor(2);
newentry();
getch();
20
break;
case 2:
textcolor(2);
printf(" ");
scanf("%s",&n);
display(n);
getch();
break;
case 3:
textcolor(2);
printf(" ");
scanf("%s",&n);
deletentry(n);
getch();
break;
case 4:
textcolor(2);
displayall();
getch();
break;
case 5:
21
textcolor(2);
makempty();
getch();
break;
case 6:
textcolor(2);
saventry();
getch();
break;
case 7:
textcolor(2);
loadentry();
getch();
break;
case 8:
textcolor(2);
deleteall();
getch();
break;
case 9:
textcolor(2);
printf(" ");
22
getch();
break;
default:
textcolor(2);
printf(" ");
getch();
break;
getch();
void saventry()
char n[50];
int c;
scanf("%s",n);
list t;
if(isempty())
else
{
23
FILE *f;
f=fopen("entry.c","a");
int i;t=l;
while(t!=NULL)
i=stricmp(t->name,n);
if(i==0)
fprintf(f,"%s %s %s %s %s %s %s",t->name,t->nick,t->email,t->address,t->city,t-
>cont,t->pin);
scanf("%d",&c);
if(c==1)
saventry();
else if(c==2)
break;
t=t->rptr;
fclose(f);
if(t==NULL)
24
printf("Entry Not Found");
void loadentry()
int i=1;
list t;
FILE *f;
f=fopen("entry.c","r");
if(f==NULL)
printf("Cannot Open");
exit(1);
while(fscanf(f," %s %s %s %s %s %s %s",t->name,t->nick,t->email,t-
>address,t->city,t->cont,t->pin)!=EOF)
i++;}
fclose(f);
void deleteall()
25
{
FILE *f;
f=fopen("entry.c","w");
fclose(f);
TESTING
2-INTEGRATION TESTING
OUTPUT:-
*****************************************************************************
***
#------------------------MINI PROJECT-SIMPLE ADDRESS BOOK----------------------#
*****************************************************************************
***
Enter Your Choice (1)-New Entry (2)-Display an Entry (3)-Delete an Entry (4
)-Display all Entries (5)-Empty the book (6)-Save Entry (7)-Load Entries (8)
26
-Delete All Saved Files (9)-End **********************************************
********************************** 1
Enter the Datas for the New Entry:Name :Ankur
Nick name :Akki
E-mail ID :[email protected]
Address :JanakPuri
City :Delhi
Contact No:123456789
Pincode :110028
Your Entry is Added
FUTURE SCOPE
In future one change can be done by adding the fingerprints of the persons of which the address
is entered.And one more major change which can be done in this project is that to add the snaps
of the person of which the address is entered.We can also add or subtract details of the
individual.
27