0% found this document useful (0 votes)
264 views

Contact Management System

Uploaded by

ujjaval2910
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
264 views

Contact Management System

Uploaded by

ujjaval2910
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

CANDIDATE’S DECLARATION

I, UJJAVAL SINGHAL Roll number 210926106173 , hereby


declare that the work which is being presented in the project
report entitled “CONTACT MANAGEMENT SYSTEM” in partial
fulfillment of the requirement to complete the 5th semester of
“Bachelor of Computer Applications” submitted in S.D. College
Of Management Studies, Muzaffarnagar (U.P.) is an authentic
record of my work carried out in the guidance of Dr. Sanjeev
Tayal, Head of Department of Computer Science, S.D. College
of Management Studies, Muzaffarnagar (U.P.) .

(UJJAVAL SINGHAL)
Roll Number - 210926106173
B.C.A.-Vth SEM
Department of Computer Application
S.D. College of Management Studies
ACKNOWLEDGEMENT

On the successful completion of MINOR PROJECT REPORT and


PROJECT entitled “CONTACT MANAGEMENT SYSTEM”.
I would like to express my sincere thanks and deep sense of
gratitude to my esteemed project guide Dr. Sanjeev Tayal, Head
of Department of Bachelor of Computer Application, S.D.
College of Management Studies, Muzaffarnagar (U.P.) for
being the constant source of help, knowledge and encouragement.

I am also thankful to Department of Bachelor of Computer


Applications, S.D. College of Management Studies,
Muzaffarnagar (U.P.) and the faculty and staff of Bachelor of
Computer Application department for their intellectual support
throughout the project work.

UJJAVAL SINGHAL
210926106173
CONTENT

• Introduction of CMS……………………………….6
• Abstract of CMS……………………………………..7
• Objective of CMS…………………………………....8
• Functionalities of CMS ………………………......8
• Scope of CMS ……………………………….............9
• Reports of CMS………….................................10
• Input data and validation……………….……..11
• Software Quality Plan and Features………..12
• Software requirement specifications………13
• Identification………………………………………..14
• User interface design……………………………..15
• Project Planning……………………………………16
• Cost Estimation……………………………………..17
• Security Testing…………………………………….20
• Languages used……………………………………..21
o C and c++
▪ Introduction of c
• Facts about c
• Structure of c
• Advantages of c
• Disadvantages of c
▪ Introduction of c++
• Uses of c++
• Object oriented programming
and c++
• Features of c++
• Standard libraries in c++
• Structure of c++
• Advantages of c++
• Disadvantages of c++
• Coding……………………………………………….34
• Project testing……………………………………42
• Conclusion………………………………………….43
• Bibliography……………………………………….44
REPORT OF CONTACT
MANAGEMENT
SYSTEM
Introduction of the Project Contact Management System:
The "Contact Management System" has been developed to override
the problems prevailing in the practicing manual system. This
software is supported to eliminate and in some cases reduce the
hardships faced by this existing system. Moreover this system is
designed for the particular need of the company to carry out
operations in a smooth and effective manner.

The application is reduced as much as possible to avoid errors while


entering the data. It also provides error message while entering invalid
data. No formal knowledge is needed for the user to use this system.
Thus by this all ii proves it is user-friendly. Contact Management
System , as described above, can lead to error free, secure, reliable
and fast management system. It can assist the user to concentrate on
their other activities rather to concentrate on the record keeping. Thus
it will help organization in better utilization of resources.

Every organization, whether big or small, has challenges to overcome


and managing the information of Credential, Contact, Profile, Mobile,
Emails. Every Contact Management System has different Contact
needs, therefore we design exclusive employee management systems
that are adapted to your managerial requirements. This is designed to
assist in strategic planning, and will help you ensure that your
organization is equipped with the right level of information and
details for your future goals. Also, for those busy executive who are
always on the go, our systems come with remote access features,
which will allow you to manage your workforce anytime, at all times.
These systems will ultimately allow you to better manage resources.
Abstract of the Project Contact Management System:
The purpose of Contact Management System is to automate the
existing manual
system by the help of computerized equipments and full-fledged
computer software, fulfilling their requirements, so that their valuable
data/information can be stored for a longer period with easy accessing
and manipulation of the same. The required software and hardware
are easily available and easy to work with.

Contact Management System, as described above, can lead to error


free,
secure, reliable and fast management system. It can assist the user to
concentrate on their other activities rather to concentrate on the record
keeping. Thus it will help organization in better utilization of
resources. The organization can maintain computerized records
without redundant entries. That means that one need not be distracted
by information that is not relevant, while being able to reach the
information.

The aim is to automate its existing manual system by the help of


computerized
equipments and full-fledged computer software, fulfilling their
requirements, so that their valuable data/information can be stored for
a longer period with easy accessing and manipulation of the same.
Basically the project describes how to manage for good performance
and better services for the clients.
Objective of Project on Contact Management System:

The main objective of the Project on Contact Management System is


to manage
the details of Contact, Credential, Telephone, Profile, Emails. It
manages all the
information about Contact, Mobile, Emails, Contact. The project is
totally built at administrative end and thus only the administrator is
guaranteed the access. The purpose of the project is to build an
application program to reduce the manual work for managing the
Contact, Credential, Mobile, Telephone. It tracks all the details about
the Telephone, Profile, Emails.

Functionalities provided by contact Management System are as


follows:

• Provides the searching facilities based on various factors. Such as


Contact,
Telephone, Profile, Emails
• Contact Management System also manage the Mobile details online
for Profile
details, Emails details, Contact.
• It tracks all the information of Credential, Mobile, Profile etc
• Manage the information of Credential
• Shows the information and description of the Contact, Telephone
• To increase efficiency of managing the Contact, Credential
• It deals with monitoring the information and transactions of Profile.
• Manage the information of Contact
• Editing, adding and updating of Records is improved which results
in proper
resource management of Contact data.
• Manage the information of Profile
• Integration of all records of Emails.
Scope of the project Contact Management System:

It may help collecting perfect management in details. In a very short


time, the
collection will be obvious, simple and sensible. It will help a person
to know the
management of passed year perfectly and vividly. It also helps in
current all worksrelative to Contact Management System. It will be
also reduced the cost of collecting the management & collection
procedure will go on smoothly.

Our project aims at Business process automation, i.e. we have tried to


computerize various processes of Contact Management System.

• In computer system the person has to fill the various forms &
number of copies of
the forms can be easily generated at a time.
• In computer system, it is not necessary to create the manifest but we
can directly
print it, which saves our time.
• To assist the staff in capturing the effort spent on their respective
working areas.
• To utilize resources in an efficient manner by increasing their
productivity through
automation.
The system generates types of information that can be used for
various
purposes.
• It satisfy the user requirement
• Be easy to understand by the user and operator
• Be easy to operate
• Have a good user interface
• Be expandable
• Delivered on schedule within the budget.
Reports of Contact Management System:

• It generates the report on Contact, Credential, Mobile


• Provide filter reports on Telephone, Profile, Emails
• You can easily export PDF for the Contact, Mobile, Profile
• Application also provides excel export for Credential, Telephone,
Emails
• You can also export the report into csv format for Contact,
Credential, Emails

Modules of Contact Management System:

• Contact Management Module: Used for managing the Contact


details.
• Emails Module : Used for managing the details of Emails
• Mobile Module : Used for managing the details of Mobile
• Credential Management Module: Used for managing the
information and details of the Credential.
• Telephone Module: Used for managing the Telephone details
• Profile Module : Used for managing the Profile information
• Login Module: Used for managing the login details
• Users Module : Used for managing the users of the system
Input Data and Validation of Project on Contact Management
System:
• All the fields such as Contact, Telephone, Emails are validated and
does not
take invalid values
• Each form for Contact, Credential, Mobile can not accept blank
value fields
• Avoiding errors in data
• Controlling amount of input
• Integration of all the modules/forms in the system.
• Preparation of the test cases.
• Preparation of the possible test data with all the validation checks.
• Actual testing done manually.
• Recording of all the reproduced errors.
• Modifications done for the errors found during testing.
• Prepared the test result scripts after rectification of the errors.
• Functionality of the entire module/forms.
• Validations for user input.
• Checking of the Coding standards to be maintained during coding.
• Testing the module with all the possible test data.
• Testing of the functionality involving all type of calculations etc.
• Commenting standard in the source files.

The software quality plan we will use the following SOA Strategy:

• In the first step, we will select the test factors and rank them. The
selected test
factors such as reliability, maintainability, portability or etc, will be
placed in the
matrix according to their ranks.
• The second step is for identifying the phases of the development
process. The
phase should be recorded in the matrix.
• The third step is that identifying the business risks of the software
deliverables.
The risks will be ranked into three ranks such as high, medium and
low.
Features of the project Contact Management System:

• Product and Component based


• Creating & Changing Issues at ease
• Query Issue List to any depth
• Reporting & Charting in more comprehensive way
• User Accounts to control the access and maintain security
• Simple Status & Resolutions
• Multi-level Priorities & Severities.
• Targets & Milestones for guiding the programmers
• Attachments & Additional Comments for more information
• Robust database back-end
• Various level of reports available with a lot of filter criteria's
• It contain better storage capacity.
• Accuracy in work.
• Easy & fast retrieval of information.
• Well designed reports.
• Decrease the load of the person involve in existing manual system.
• Access of any information individually.
• Work becomes very speedy.
• Easy to update information
Software Requirement Specification:

The Software Requirements Specification is produced at the


culmination of the
analysis task. The function and performance allocated to software as
part of system engineering are refined by establishing a complete
information description, a detailed functional and behavioral
description, an indication of performance requirements and design
constraints, appropriate validation criteria, and other data pertinent to
requirements.

The proposed system has thefollowing requirements;

• System needs store information about new entry of Contact.


• System needs to help the internal staff to keep information of
Credential and find them as per various queries.
• System need to maintain quantity record.
• System need to keep the record of Telephone.
• System need to update and delete the record.
• System also needs a search area.
• It also needs a security system to prevent data.
Identification of need:
The old manual system was suffering from a series of drawbacks.
Since whole of the system was to be maintained with hands the
process of keeping, maintaining and retrieving the infonnation was
very tedious and lengthy. The records were never used to
be in a systematic order. there used to be lots of difficulties in
associating any particular transaction with a particular context. If any
information was to be found it was required to go through the
different registers, documents there would never exist anything like
report generation. There would always be unnecessary consumption
of time while entering records and retrieving records. One more
problem was that it was very difficult to find errors while entering the
records. Once the records were entered it was very
difficult to update these records.

The reason behind it is that there is lot of information to be


maintained and have to be kept in mind while running the business
.For this reason we have provided features Present system is partially
automated (computerized), actually existing system is quite laborious
as one has to enter same information at three different places.

Following points should be well considered:

• Documents and reports that must be provided by the new system:


there can also be few reports, which can help management in
decision-making and cost controlling, but since these reports do not
get required attention, such kind ofreports and infonnation were also
identified and given required attention.
• Details of the information needed for each document and report.
• The required frequency and distribution for each document.
• Probable sources of infonnation for each document and report.
• With the implementation of computerized system, the task of
keeping records in an organized manner will be solved. The greatest
of all is the retrieval of infonnation, which will be at the click of the
mouse. So the proposed system helps in saving the time in different
operations and making infonnation flow easy giving
valuable reports.
User Interface Design:

User Interface Design is concerned with the dialogue between a user


and the computer. It is concerned with everything from starting the
system or logging into the system to the eventually presentation of
desired inputs and outputs. The overall flow of screens and messages
is called a dialogue.

The following steps are various guidelines tor User Interface


Design:

1. The system user should always be aware of what to do next.


2. The screen should be formatted so that various types of
information, instructions and messages always appear in the same
general display area.
3. Message, instructions or information should be displayed long
enough to allow the system user to read them.
4. Use display attributes sparingly.
5. Default values for fields and answers to be entered by the user
should be specified.
6. A user should not be allov.ed to proceed without correcting an
error.
7. The system user should never get an operating system message or
fatal error.
Project Planning:

Software project plan can be viewed as the following:

1) Within the organization: How the project is to be implemented?


What are various constraints (time, cost, staff)? What is market
strategy?
2) With respect to the customer: Weekly or timely meetings with the
customer with presentation on status reports. Customers feedback is
also taken and further modification and developments are done.
Project milestones and deliverables are also presented to the
customer.
For a successful software project, the following steps can be
followed:

• Select a project
o Identifying project's aims and objectives
o Understanding requirements and specification
o Methods of analysis, design and implementation
o Testing techniques
o Documentation
• Project milestones and deliverables

• Budget allocation
o Exceeding limits within control
• Project Estimates
o Cost
o Time
o Size of code
o Duration
•Resource Allocation
o Hardware
o Software
o Digital Library
•Risk Management
o Risk avoidance
o Risk detection
Cost estimation of the project:

Software cost comprises a small percentage of overall computer-


based system cost. There are a number of factors, which are
considered, that can affect the ultimate cost of the software such as -
human, technical, Hardware and Software availability etc.

The main point that was considered during the cost estimation of
project was its sizing. In spite of complete software sizing, function
point and approximate lines of code were also used to "size" each
element of the Software and their costing.

The cost estimation done by me for Project also depend upon the
baseline metrics collected from past projects and these were used in
conjunction with estimation variables to develop cost and effort
projections.

We have basically estimated this project mainly on two bases -


1) Effort Estimation - This refers to the total man-hours required for
the development of the project. It even includes the time required for
doing documentation and user
manual.

2) Hardware Required Estimation - This includes the cost of the


PCs and the hardware cost required for development of this project.
Use Case Model of the Project:

The use case model for any system consists of ·use cases". Use cases
represent different ways in which the system can be used by the user.
A simple way to find all the use case of a system is to ask the
questions "What the user can do using the system?" The use cases
partition the system behavior into transactions such that each
transaction performs some useful action from the users' point of view.

The purpose of the use case to define a piece of coherent behavior


without reveling the internal structure of the system. An use case
typically represents a sequence of interaction between the user and the
system. These interactions consists of one main line sequence is
represent the normal interaction between the user and the
system. The use case model is an important analysis and design
artifact (task).Use cases can be represented by drawing a use case
diagram and writing an accompany text elaborating the drawing.
In the use case diagram each use case is represented by an ellipse with
the name of use case written inside the ellipse. All the ellipses of the
system are enclosed with in a rectangle which represents the system
boundary. The name of the system being moduled appears inside the
rectangle. The different users of the system are represented by using
stick person icon. The stick person icon is normally referred to as
an Actor. The line connecting the actor and the use cases is called the
communication relationship. When a stick person icon represents an
external system it is annotated by the stereo type«extemal system».
There are seven rules for construct a data flow diagram:
I) Arrows should not cross each other.
ii) Squares, circles and files must wears names.
iii) Decomposed data flows must be balanced.
Iv) No two data flows, squares or circles can be the same names.
v) Draw all data flows around the outside of the diagram.
vi) Choose meaningful names for data flows, processes & data stores.
vii)Control information such as record units, password and validation
requirements are not penitent to a data flow diagram.

Additionally, a DFD can be utilized to visualize data processing or a


structured design.
This basic DFD can be then disintegrated to a lower level diagram
demonstrating smaller steps exhibiting details of the system that is
being modeled.

On a DFD, data items flow from an external data source or an internal


data store to an internal data store or an external data sink, via an
internal process. It is common practice to draw a context-level data
flow diagram first, which shows the interaction between the system
and external agents, which act as data sources and data sinks. On
the context diagram (also known as the Level O DFD'), the system's
interactions with the outside world are modeled purely in terms of
data flows across the system boundary. The context diagram shows
the entire system as a single process, and gives no clues
as to its internal organization.

This context-level DFD is next "exploded", to produce a Level 1 DFD


that shows some of the detail of the system being modeled. The level
1 DFD shows how the system is divided into sub-systems (processes),
each of which deals with one or more of the data flows to or from an
external agent, and which together provide all of the
functionality of the system as a whole. The level 1 DFD is further
spreaded and split into more descriptive and detailed description
about the project as level 2 DFD.The level 2 DFD can be a number of
data flows which will finally show the entire description of the
software project.
Security Testing of the Project:

Testing is vital for the success of any software. no system design is


ever perfect. Testing is also carried in two phases. first phase is during
the software engineering that is during the module creation. second
phase is after the completion of software. this is system testing which
verifies that the whole set of programs hanged together.

White Box Testing:

In this technique, the close examination of the logical parts through


the software are tested by cases that exercise species sets of
conditions or loops. all logical parts of the software checked once.
errors that can be corrected using this technique are typographical
errors, logical expressions which should be executed once may be
getting executed more than once and error resulting by using wrong
controls and loops. When the box testing tests all the independent part
within a module a logical decisions on their true and the false side are
exercised .All loops andbounds within their operational bounds were
exercised and internal data structure to ensure their validity were
exercised once.

Black Box Testing:

This method enables the software engineer to device sets of input


techniques that fully exercise all functional requirements for a
program. black box testing tests the input, the output and the
external data. it checks whether the input data is correct and whether
we are getting the desired output.

Alpha Testing:
Acceptance lesting is also sometimes called alpha testing. Be spoke
systems are developed for a single customer. The alpha testing
proceeds until the system developer and the customer agree that the
provided system is an acceptable implementation of the system
requirements.
LANGUAGES
USED
C and C++
INTRODUCTION OF C LANGUAGE:

C is a general-purpose high level language that was originally


developed by Dennis Ritchie for the Unix operating system. It was
first implemented on the Digital Equipment Corporation PDP-11
computer in 1972.

The Unix operating system and virtually all Unix applications are
written in the C language. C has now become a widely used
professional language for various reasons.

• Easy to learn
• Structured language
• It produces efficient programs.
• It can handle low-level activities.
• It can be compiled on a variety of computers.
FACTS ABOUT C:
• C was invented to write an operating system called
UNIX.
• C is a successor of B language which was introduced
around 1970
• The language was formalized in 1988 by the American
National Standard Institute (ANSI).
• By 1973 UNIX OS almost totally written in C.
• Today C is the most widely used System Programming
Language.
• Most of the state of the art software have been
implemented using C.
ADVANTAGES OF C LANGUAGE:
C programming language is the structured programming
language, So, It helps you to think of the problem in terms of
function modules or blocks, Collection of these modules
makes a complete program, This modular structure makes the
program debugging, testing and maintenance easier.

C programming language is a building block for many other


currently known languages , Python is a fully Object-Oriented
High-Level programming language , It is written in C (
perhaps C++ too ) .

C programming language is a small language , The concepts


that it requires is quite short , There are 32 keywords in ANSI
C only and its strength lies in its built-in functions , Many
standard functions are available that can be used for
developing the programs .

C language has the ability to extend itself , It is the collection


of functions which are supported by the C library this makes
us easier to add our own functions to C library, Because of the
availability of large number of functions , the programming
task becomes simple .
DISADVANTAGES OF C LANGUAGES:

C programming language does not support Object Oriented


Programming ( OOP ) features such as Inheritance ,
Encapsulation , Polymorphism etc , that’s why C++ is
developed , It has no strict type checking , For example , we
can pass an integer value , It is for the floating data type .

C language is a procedure oriented language , So , You should


develop your program using procedure oriented language only
and you have to implement any algorithms as a set of function
calls .

C programming language does not offer support for


namespace like C++ , Without Namespace , we can’t declare
two variables of same name and you can’t use the same
variable name again in one scope .

C language doesn’t perform Run Time Type Checking , It


compiles time type checking only at run time , C language
doesn’t ensure whether correct data type is used instead it
performs automatic type conversion .

C language doesn’t have the concept of constructor or


destructor , It does not offer the object oriented features , so ,
it does not have Constructor and Destructor features .

Constructor and Destructor is used to construct the object and


destroy the object , So , in C programming Language you
have to implement manually construction and destruction of
the variable using function or by the other means .
C programming language has a low level of abstraction , It is
a lingua franca , C language is a small language , It seldom
rewards you with instant solutions , Learning C first requires a
lot of patience .

C programming language does not offer data security , It does


not support reusability of source code , It offers no help for
solving real world problems.
INTRODUCTION OF C++

C++ is a multi-paradigm programming language that supports


object-oriented programming (OOP), created by BJarne
Stroustrup in 1983 at Bell Labs, C++ is an extension(superset)
of C programming and the programs written in C language
can run in C++ compilers.
USES OF C++:
C++ is used by programmers to create computer software. It is
used to create general systems software, drivers for various
computer devices, software for servers and software for
specific applications and also widely used in the creation of
video games.

C++ is used by many programmers of different types and


coming from different fields. C++ is mostly used to write
device driver programs, system software and applications that
depend on direct hardware manipulation under real time
constraints. It is also used to teach the basics of object
oriented features because it is simple and is also used in the
fields of research. Also, many primary user interfaces and
system files of Windows and Macintosh are written using
C++. So, C++ is really a popular, strong and frequently
used programming language of this modern programming era.
OBJECT ORIENTED PROGRAMMING
AND C++

C++ supports object-oriented programming (OOP), with four


major principles of object-oriented development:

• Abstraction
• Encapsulation
• Inheritance
• Polymorphism

C++ is not purely object-oriented language because object-


oriented means to works with object and classes, but in C++
you can write code without creating a class.
STANDARD LIBRARIES IN C ++
C++ standard library was created after many years and it has
three important parts:

C++ core language provides all the building blocks including


data types, variables and literals etc.The C++ Standard
Library has rich set of methods to manipulating files and
strings. The STL(Standard Template Library) provides a rich
set of template classes for manipulating data structures.
STRUCTURE OF C ++
ADVANTAGES OF C ++
• Object oriented
• Portable language (writing a program irrespective of
operating system as well as Hardware)
• Low-level language like Assembly language on Machine
language called portable.
• C++ use multi-paradigm programming. The Paradigm
means the style of programming.
• paradigm concerned about logics, structure, and
procedure of the program. C++ is multi-paradigm means
it follows three paradigm Generic, Imperative, Object
Oriented.
• It is useful for the low-level programming language and
very efficient for general purpose.
• C++ provide performance and memory efficiency.
• It provides a high-level abstraction.
• In the language of the problem domain.
• C++ is compatible with C.
• C++ used reusability of code.
• C++ used inheritance, polymorphism.
DISADVANTAGES OF C++
• It has no security
• C++ has a boo table
• Complex in a very large high-level program.
• Used for platform specific application commonly.
• For a particular operating system or platform, the library
set has usually chosen that locks.
• When C++ used for web applications complex and
difficult to debug.
• C++ can’t support garbage collection.
• C++ is not secure because it has a pointer, friend
function, and global variable.
• No support for threads built in.
CODING:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct contacts
{
char name[20];
char number[15];
char company[10];
char gmail[40];
} info;
FILE *storeContact = NULL;
FILE *tempContact = NULL;
int countContact = 0;
void addContact()
{
int check;
storeContact = fopen("contactDetails.txt", "r");
if (storeContact == NULL)
{
printf("\nSystem Error try agian\n");
return;
}
if (countContact == 0)
{
while (fread(&info, sizeof(info), 1, storeContact) > 0)
{
countContact++;
}
}
fclose(storeContact);
printf("Enter Name :");
fflush(stdin);
gets(info.name);
printf("Enter Number :");
fflush(stdin);
gets(info.number);
printf("Enter Company :");
fflush(stdin);
gets(info.company);
printf("Enter Gmail :");
fflush(stdin);
gets(info.gmail);
storeContact = fopen("contactDetails.txt", "a");
if (storeContact == NULL)
{
printf("System Error try agian\n");
return;
}
fwrite(&info, sizeof(info), 1, storeContact);
printf("\nContact is successfully Added\n");
countContact++;
fclose(storeContact);
}
void deleteContact()
{
char number[15];
char name[20];
int check = 0;
printf("\nIf you want to delete contact then provide the contact infomation\n");
printf("Enter Name :");
fflush(stdin);
gets(name);
printf("Enter Number :");
fflush(stdin);
gets(number);
storeContact = fopen("contactDetails.txt", "r");
tempContact = fopen("tempDetails.txt", "a");
if (storeContact == NULL || tempContact == NULL)
{
printf("\nSystem error try again\n");
return;
}
while (!feof(storeContact))
{
fread(&info, sizeof(info), 1, storeContact);
if (!strcmp(name, info.name) && !strcmp(number, info.number))
{
check = 1;
}
}
if (check == 1)
{
rewind(storeContact);
while (fread(&info, sizeof(info), 1, storeContact) > 0)
{
if (!strcmp(name, info.name) && !strcmp(number, info.number))
{
countContact--;
}
else
{
fwrite(&info, sizeof(info), 1, tempContact);
}
}
fclose(tempContact);
fclose(storeContact);
remove("contactDetails.txt");
rename("tempDetails.txt", "contactDetails.txt");
printf("\nContact is successfully Deleted\n");
}
else
{
printf("\nContact is not found\n");
fclose(tempContact);
fclose(storeContact);
}
}
void updateContact()
{
char name[20], newNumber[15], number[15], company[10], gmail[40];
int check, choose, name2, number2, company2, gmail2;
char ch;
storeContact = fopen("contactDetails.txt", "r");
if (storeContact == NULL)
{
printf("\nSystem Error try agian\n");
return;
}
if (countContact == 0)
{
while (fread(&info, sizeof(info), 1, storeContact) > 0)
{
countContact++;
}
}
rewind(storeContact);
if (countContact == 0)
{
printf("\nThere is no contact\n");
return;
}
printf("\nWhich contact do you want to update Enter Number :");
fflush(stdin);
gets(number);
while (fread(&info, sizeof(info), 1, storeContact) > 0)
{
if (!strcmp(number, info.number))
{
check = 1;
}
}
fclose(storeContact);
if (check == 1)
{
again:
printf("\nIf you want to update Name then Press 'Y' otherwise 'N'\n");
fflush(stdin);
scanf("%c", &ch);
if (ch == 'Y' || ch == 'y')
{
printf("Enter New Name :");
fflush(stdin);
gets(name);
name2 = 1;
}
else if (ch == 'N' || ch == 'n')
{
}
else
{
printf("\nInvalid Key try again\n");
goto again;
}
again1:
printf("If you want to update Number then Press 'Y' otherwise 'N'\n");
fflush(stdin);
scanf("%c", &ch);
if (ch == 'Y' || ch == 'y')
{
printf("Enter New Number :");
fflush(stdin);
gets(newNumber);
number2 = 1;
}
else if (ch == 'N' || ch == 'n')
{
}
else
{
printf("\nInvalid Key try again\n");
goto again1;
}
again2:
printf("If you want to update Company then Press 'Y' otherwise 'N'\n");
fflush(stdin);
scanf("%c", &ch);
if (ch == 'Y' || ch == 'y')
{
printf("Enter New Comapay :");
fflush(stdin);
gets(company);
company2 = 1;
}
else if (ch == 'N' || ch == 'n')
{
}
else
{
printf("\nInvalid Key try again\n");
goto again2;
}
again3:
printf("Do you want to update G-mail then Press 'Y' otherwise 'N'\n");
fflush(stdin);
scanf("%c", &ch);
if (ch == 'Y' || ch == 'y')
{
printf("Enter New E-mail :");
fflush(stdin);
gets(gmail);
gmail2 = 1;
}
else if (ch == 'N' || ch == 'n')
{
}
else
{
printf("\nInvalid Key try again\n");
goto again1;
}
storeContact = fopen("contactDetails.txt", "r");
tempContact = fopen("tempDetails.txt", "a");
if (storeContact == NULL || tempContact == NULL)
{
printf("\nSystem Error try agian\n");
return;
}
while (fread(&info, sizeof(info), 1, storeContact) > 0)
{
if (!strcmp(number, info.number))
{
if (name2 == 1)
{
strcpy(info.name, name);
}
if (number2 == 1)
{
strcpy(info.number, newNumber);
}
if (company2 == 1)
{
strcpy(info.company, company);
}
if (gmail2 == 1)
{
strcpy(info.gmail, gmail);
}
fwrite(&info, sizeof(info), 1, tempContact);
}
else
{
fwrite(&info, sizeof(info), 1, tempContact);
}
}
fclose(storeContact);
fclose(tempContact);
remove("contactDetails.txt");
rename("tempDetails.txt", "contactDetails.txt");
printf("\nContact is successfully updated\n");
}
else
{
printf("\nContact is not found\n");
}
}
void searchContact()
{
char number[15];
int notFound = 0, check;
storeContact = fopen("contactDetails.txt", "r");
if (storeContact == NULL)
{
printf("\nSystem Error try agian\n");
return;
}
if (countContact == 0)
{
while (fread(&info, sizeof(info), 1, storeContact) > 0)
{
countContact++;
}
}
rewind(storeContact);
if (countContact == 0)
{
printf("\nThere is no contact\n");
return;
}
printf("Enter Number :");
fflush(stdin);
gets(number);
for (int i = 1; i <= countContact; i++)
{
fread(&info, sizeof(info), 1, storeContact);
if (!strcmp(number, info.number))
{
}
else
{
notFound++;
}
}
rewind(storeContact);
if (notFound == countContact)
{
printf("\nContact in not found\n");
}
else
{
printf("\n");
for (int i = 1; i <= countContact; i++)
{
fread(&info, sizeof(info), 1, storeContact);
if (!strcmp(number, info.number))
{
printf("%d.%s\t%s\t%s\t%s\n", i, info.name, info.number, info.company,
info.gmail);
}
}
}
fclose(storeContact);
}
void viewAllContact()
{
int check;
storeContact = fopen("contactDetails.txt", "r");
if (storeContact == NULL)
{
printf("\nSystem Error try agian\n");
return;
}
if (countContact == 0)
{
while (fread(&info, sizeof(info), 1, storeContact) > 0)
{
countContact++;
}
}
rewind(storeContact);
if (countContact == 0)
{
printf("\nThere is no contact\n");
return;
}
printf("\n");
for (int i = 1; i <= countContact; i++)
{
fread(&info, sizeof(info), 1, storeContact);
printf("%d.%s\t%s\t%s\t%s\n", i, info.name, info.number, info.company, info.gmail);
}
fclose(storeContact);
}
void main()
{
int choose;
printf("\nWelcome to contact management system project\n");
do
{
printf("\nPress 1 to Add new contact\n");
printf("Press 2 to Delete contact\n");
printf("Press 3 to Upadate contact\n");
printf("Press 4 to Search contact\n");
printf("Press 5 to View all contacts\n");
printf("Press 6 to Exit\n");
again:
printf("Please choose any option: ");
scanf("%d", &choose);
switch (choose)
{
case 1:
addContact();
break;
case 2:
deleteContact();
break;
case 3:
updateContact();
break;
case 4:
searchContact();
break;
case 5:
viewAllContact();
break;
case 6:
exit(0);
break;
default:
printf("\nInvalid option try again\n");
goto again;
}
} while (1);
}
PROJECT TESTING

COMPILATION TEST:
It was a good idea to do our stress testing early on, because it
gave us time to fix some of the unexpected deadlocks and
stability problems that only occurred when components were
exposed to very high transaction volumes.

EXECUTION TEST:
This program was successfully loaded and executed. Because
of good programming there was no execution error.

OUTPUT TEST:

The successful output screens are placed in the output screens


section.
CONCLUSION
• The project has been appreciated by all the users in the
organization.
• It is easy to use.
• It uses the GUI provided in the user dialog.
• User friendly screens are provided.
• The usage of software increases the efficiency, decreases
the effort.
• It has been efficiently employed as a site management
mechanism.
• It has been thoroughly tested and implemented.
BIBLIOGRAPHY
• Let us C- Yashwant Kanetkar.
• Programming in C- Balaguruswamy.
• D.Parasons,”Object Oriented Programming using C++”,
BPB publication.
• A.R.Venugopal, Rajkumar, T.Ravishanker “Mastering
C++”,TMH,1997.
• Foley, Van Dam, Feiner, Hughes, Computer Graphics
Principles and practice,2000.

You might also like