Professional Documents
Culture Documents
Date ......................
Sumitted To
Mr. Sourabh Sir
Sumitted By
Subham Jain
B.Sc. VIth Sem
DECLARATION
Date : Submitted By
Subham Jain
Acknowledgment
Subham Jain
PREFACE
CONTENTS
1) Introduction
i) Introduction of the Project
ii) Objective of the Project
2) System Analysis
i) Introduction
ii) Existing System
iii) Drawback of the Existing System
iv) Proposed System
v) Objective and Advantage of Proposed System
vii) Data Flow Diagram
4) Source Code
5)Conclusion
6) Future Scope And Result Discussion
7) Bibliography
REQUIREMENT ANALYSIS
System analysis is the performance management and documentation of activities
related to the four life cycle phases of any software namely:
The Study Phase
The Design Phase
The Development Phase
The Operators Phase
System analysis is a vast field of study through which system analyst puts his
thoughts and searches for the solution of problem. He has to get a clear idea of
what he has in hand and what he has to produce. He has to extract the essence of
expectations. He has to satisfy the user in the very possible way. System analysis
needs and should include the following steps of study:
Study of current methods, the basic inputs available and output
desired.
Reduce redundancy and increase consistency.
Ideas regarding code generation.
Software Analysis starts with a preliminary analysis and later switches on to a
detailed one. During the preliminary analysis the Analyst takes a quick look at
what is needed and whether the cost benefits. Detailed analysis studies in depth
all the cornered factors, which builds and strengthens the software.
A system study is a step-by-step process used to identify and then developed the
software needed to control the processing of specific application. System study is
also known as SDLC (Software Development Life Cycle).
Steps of SDLC are:
1. Problem Definition
2. Feasibility Study
3. System Analysis
4. System Design
5. Implementation
6. Post Implementation
7. Maintenance
EXISTING SYSTEM
The existing system was a manual one. Whatever be the process involved in the
system were done through register (files). There were lots of complexities
involved in the system. When any customer takes new connections then separate
files were maintained. Updating of data was very tedious job. It was not easy to
do several administrative works like managing rates of calls, addition or
modification of metered calls & customer entries.
The existing system is totally manual thus there are chances of error in
processing.
The basic and major drawbacks in the existing system are the speed of
retrieval of data from files, which leads to delay.
Maintenance of voluminous data is very cumbersome and laborious job.
The manual jobs such as calculation are more error prone.
There are plenty of chances of duplicity of data and information.
Updating is very tedious job.
There is no central database from where one can get different statistical
data at one place.
The above facts, figures and drawbacks clearly indicate that there is need for
computerization and thus decided to computerize the TELEPHONE BILLING
SYSTEM. Since the existing system was totally manual which has lots of
complexities, shortcomings in itself and all the data was being stored in registers,
files etc thus to overcome the limitation of the existing system, the new
computerized system was needed, so that information can be provided to the user
more quickly, easily and more accurately.
PROPOSED SYSTEM
The new system titled TELEPHONE BILLING SYSTEM was hence proposed
to remove all the drawbacks discussed above.
Information is a vital ingredient for the operation and
management of any organization. Thus any system should have the ability to
provide error free filtered information after processing the required data. This
system has been taken up with a view for developing a more sophisticated system
that can be easily handled by any kind of users. The proposed system aims at
efficient and timely information for decision-making, integrate with other
functions, and reduce redundant work.
CONTEXT DIAGRAM
CUSTOMER RECORDS
AND RATES
ADMINISTRATOR
TELEPHONE
GENERATED BILL
BILLING
SYSTEM
CUSTOMER
Ratings
Generated
Bill
Generation of
Bill
Rate Maintenance
Customer Details
(Masterfile)
User
SOURCE CODE
/*
-----------------------------------------------------------------------------------------------------------------------------*TELEPHONE BILLING SYSTEM*
-------------------------------------------------------------------------------------------------------------------------------*/
/*
-----------------------------------------------------------------------------------------------------------------------------*HEADER FILES INCLUDED*
-------------------------------------------------------------------------------------------------------------------------------*/
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <process.h>
#include <ctype.h>
#include <dos.h>
#include <dir.h>
#include <fstream.h>
/*
-----------------------------------------------------------------------------------------------------------------------------*CLASS DECLARATION*
-------------------------------------------------------------------------------------------------------------------------------*/
class customer
{
char ph[10];
char name[30];
char add[40];
char type;
public :
void append();
void display();
void deleter();
void modify();
void list();
void help();
}cust;
/*
-----------------------------------------------------------------------------------------------------------------------------* FUNCTION TO DISPLAY THE MESSAGE*
-------------------------------------------------------------------------------------------------------------------------------*/
void message(char mess[80])
{
int l,d;
l=strlen(mess);
d=l/2;
gotoxy(2,24);
textcolor(WHITE+BLINK);
textbackground(BLACK);
cout<<("
gotoxy(40-d,24);
clreol();
cout<<("%s",mess);
textcolor(BLACK);
textbackground(WHITE);
}
");
/*
-----------------------------------------------------------------------------------------------------------------------------* MAIN FUNCTION *
-------------------------------------------------------------------------------------------------------------------------------*/
void main()
{
textcolor(BLACK);
textbackground(WHITE);
char ch,ch1;
while(1)
{
clrscr();
textcolor(WHITE);
textbackground(BLACK);
gotoxy(25,5);
cout<<("MAHANAGAR TELEPHONE NIGAM LTD.");
textcolor(BLACK);
textbackground(WHITE);
gotoxy(25,8);
cout<<" D - Display a Bill";
gotoxy(25,10);
cout<<" L - List of customers";
gotoxy(25,12);
cout<<" H - Help";
gotoxy(25,14);
cout<<" M - Modify a record";
gotoxy(25,16);
cout<<" Q - Quit";
message("Select your choice");
gotoxy(40,18);
ch =getch();
ch = toupper(ch);
switch(ch)
{
case ('Q') : textcolor(WHITE);
textbackground(BLACK);
clrscr();
exit(1);
}
/*
-----------------------------------------------------------------------------------------------------------------------------* FUNCTION TO ADD THE CUSTOMER RECORD IN
THE FILE*
-------------------------------------------------------------------------------------------------------------------------------*/
void customer :: append()
{
char choice;
fstream fp;
fp.open("tphone.dat", ios::app);
if (!fp)
{
cout<<"Unable to open FILE.";
getch();
return;
}
while(1)
{
clrscr();
gotoxy(3,3);
cout<<"Customer Record #";
message("Enter the customer record");
while(1)
{
message("Enter the name");
gotoxy(3,5);
cout<<"Name
: ";
gotoxy(25,5);
gets(name);
if(strlen(name)==0)
{
gotoxy(2,23);
clreol();
textcolor(WHITE+BLINK);
textbackground(BLACK);
{
case ('1') :
fp.write((char *) this,sizeof(cust));
fp.close();
return;
case ('2') : fp.write((char *) this,sizeof(cust));
break;
case ('0') : fp.close();
return;
default :
fp.close();
return;
}
}
}
/*
-----------------------------------------------------------------------------------------------------------------------------* FUNCTION TO DISPLAY THE CUSTOMER RECORD AND
CALCULATE THE BILL*
-------------------------------------------------------------------------------------------------------------------------------*/
void customer :: display()
{
char p[10];
char choice;
int found=0;
int no;
float bill=0.0, tax=0.0, fine=0.0, bbill=0.0, abill=0.0;
fstream fp;
fp.open("tphone.dat", ios::in);
if (!fp)
{
cout<<"Unable to open a file";
getch();
fp.close();
return;
}
while(choice != '0')
{
clrscr();
gotoxy(3,20);
cout<<"Please enter the Phone No. ";
cin>>p;
if (!strcmp(p,"0"))
return;
found = 0;
fp.seekg(0);
while (fp.read((char *)this ,sizeof(cust)))
{
if (found==1)
break;
if (!strcmp(ph,p))
{
clrscr();
gotoxy(28,2);
textcolor(BLACK+BLINK) ;
textbackground(WHITE);
cout<<("MAHANAGAR TELEPHONE BILL");
textcolor(WHITE);
textbackground(BLACK);
gotoxy(3,4);
cout<<"Name
: ";
cout<<name;
gotoxy(35,5);
cout<<"Address
: ";
cout<<add;
gotoxy(35,4);
cout<<"Assigned Ph. No. : ";
cout<<ph;
gotoxy(3,5);
cout<<"Catagory ( O/R ) : ";
cout<<type;
gotoxy(23,8);
cout<<"___________";
gotoxy(10,8);
cout<<"No. of calls ";
cin>>no;
if ( no <= 150 )
bill = 0 ;
else
{
no = no - 150;
if (toupper(type) == 'O')
bill = no * 1.00 ;
else
bill = no * .80;
}
gotoxy(10,9);
cout<<"Bill";
gotoxy(70,9);
cout<<bill;
tax = (5*bill)/100;
gotoxy(10,10 );
cout<<"5% Tax";
gotoxy(70,10);
cout<<tax;
gotoxy(10,11);
cout<<"Duties";
gotoxy(70,11);
cout<<"100";
int dd,mm,yy;
struct date d; // Getting system Date
getdate(&d);
dd = d.da_day;
mm = d.da_mon;
yy = d.da_year;
gotoxy(10,15) ;
cout<<"TOTAL BILL before " ;
cout<<dd<<"/"<<mm<<"/"<<yy;
bbill = bill+tax+100;
gotoxy(70,15);
cout<<bbill;
gotoxy(10,17);
cout<<"Late Fine";
fine = (bbill*5)/100;
gotoxy(70,17);
cout<<fine;
gotoxy(10,21);
cout<<"TOTAL BILL after ";
cout<<dd<<"/"<<mm<<"/"<<yy;
abill = bbill+fine;
gotoxy(70,21);
cout<<abill;
found = 1;
message("Press a Key");
getch();
}
}
message("Enter 1 or 2 to cont.");
gotoxy(4,22);
cout<<"1 : Cont. 0 : Exit ";
cout<<"? ";
cin>>choice;
switch(choice)
{
case ('1') :
break;
case ('0') : return;
default : return;
}
}
fp.close();
}
/*
-----------------------------------------------------------------------------------------------------------------------------* FUNCTION TO DISPLAY THE LIST OF THE CUSTOMERS*
-------------------------------------------------------------------------------------------------------------------------------*/
void customer :: list()
{
clrscr();
fstream fp;
int r;
fp.open("tphone.dat", ios::in);
if (!fp)
{
cout<<"Unable to open";
getch();
fp.close();
return;
}
gotoxy(35,2);
cout<<"List of Customers";
gotoxy(35,3);
cout<<"*****************";
gotoxy(5,4);
cout<<"Name";
gotoxy(40,4);
cout<<"Phone No.";
gotoxy(65,4);
cout<<"Catagory";
gotoxy(1,5);
cout<<"***************************************************************************
****";
r=6;
while (fp.read((char *) this, sizeof(cust)))
{
if (r >= 21)
{
message("Press a key");
getch();
clrscr();
gotoxy(35,2);
cout<<"List of customers";
gotoxy(35,3);
cout<<"*****************";
gotoxy(5,4);
cout<<"Name";
gotoxy(40,4);
cout<<"Phone No.";
gotoxy(65,4);
cout<<"Catagory";
gotoxy(1,5);
cout<<"***************************************************************************
****";
r=6;
}
gotoxy(5,r);
cout<<name;
gotoxy(40,r);
cout<<ph;
gotoxy(65,r);
if (toupper(cust.type) == 'O')
cout<<"Office";
else
cout<<"Residential";
r++;
}
message("Press a key");
getch();
fp.close();
}
/*
-----------------------------------------------------------------------------------------------------------------------------* FUNCTION TO DELETE THE RECORD OF CUSTOMER
FROM THE FILE*
-------------------------------------------------------------------------------------------------------------------------------*/
void customer :: deleter()
{
char ch;
char p[10];
fstream temp,fp;
fp.open("tphone.dat", ios::in);
if (!fp)
{
cout<<"Unable to open Telephone file";
getch();
fp.close();
return;
}
temp.open("temp.dat", ios::out);
if (!temp)
{
cout<<"Unable to open Temporary file";
getch();
temp.close();
return;
}
clrscr();
gotoxy(5,3);
cout<<"Enter the Phone No. to be deleted : ";
cin>>p;
if(!strcmp(p,"0"))
return;
int found=0;
while (fp.read((char *) this, sizeof(cust)))
{
if (!strcmp(p,ph))
{
found = 1;
gotoxy(5,5);
cout<<"Name
"<<name;
gotoxy(5,6);
cout<<"Address " <<add;
gotoxy(5,7);
cout<<"Catagory "<<type;
gotoxy(6,10);
cout<<"Delete this record (Y/N) ";
cin>>ch;
if (toupper(ch) == 'N')
temp.write((char *) this,sizeof(cust));
}
else
temp.write((char *) this,sizeof(cust));
}
fp.close();
temp.close();
if (toupper(ch) == 'N')
return;
if (!found)
{
cout<<"\n\nTelephone no. not found";
getch();
return;
}
fp.open("tphone.dat", ios::out);
temp.open("temp.dat", ios::in);
while (temp.read((char *) this, sizeof(cust)))
fp.write((char *) this, sizeof(cust));
fp.close();
temp.close();
}
/*
-----------------------------------------------------------------------------------------------------------------------------* FUNCTION TO MODIFY THE RECORD OF CUSTOMER
FROM THE FILE*
-------------------------------------------------------------------------------------------------------------------------------*/
void customer :: modify()
{
char ch;
char p[10];
fstream temp,fp;
fp.open("tphone.dat", ios::in);
if (!fp)
{
cout<<"Unable to open Telephone file";
getch();
fp.close();
return;
}
temp.open("temp.dat", ios::out);
if (!temp)
{
cout<<"Unable to open Temporary file";
getch();
temp.close();
return;
}
clrscr();
gotoxy(5,3);
cout<<"Enter the Phone No. to be Modify : ";
cin>>p;
if(!strcmp(ph,"0"))
return;
int found=0;
while (fp.read((char *) this, sizeof(cust)))
{
if (!strcmp(p,ph))
{
found = 1;
gotoxy(5,5);
cout<<"Name
"<<name;
gotoxy(5,6);
cout<<"Address " <<add;
gotoxy(5,7);
cout<<"Catagory "<<type;
gotoxy(6,10);
cout<<"Modify this record (Y/N) ";
cin>>ch;
if (toupper(ch) == 'Y')
{
gotoxy(3,13);
cout<<"Customer Record #";
message("Enter the customer record");
while(1)
{
gotoxy(3,15);
cout<<"Name
: ";
gets(name);
if (strlen(name) != 0)
break;
}
gotoxy(3,16);
cout<<"Address
: ";
gets(add);
while(1)
{
gotoxy(3,17);
cout<<"Assigned Ph. No. : ";
cin>>ph;
if (ph != 0 )
break;
}
message("Enter O for Office and R for residential phone");
gotoxy(3,18);
cout<<"catagory ( O/R )
: ";
cin>>type;
}
}
temp.write((char *) this,sizeof(cust));
}
fp.close();
temp.close();
if (toupper(ch) == 'N')
return;
if (!found)
{
cout<<"\n\nTelephone no. not found";
getch();
return;
}
fp.open("tphone.dat", ios::out);
temp.open("temp.dat", ios::in);
while (temp.read((char *) this, sizeof(cust)))
fp.write((char *) this, sizeof(cust));
fp.close();
temp.close();
}
/*
-----------------------------------------------------------------------------------------------------------------------------* FUNCTION TO DISPLAY THE DISCRIPTION FOR THE
PROJECT WORKING*
-------------------------------------------------------------------------------------------------------------------------------*/
void customer :: help()
{
clrscr();
gotoxy(35,2);
textcolor(WHITE + BLINK);
textbackground(BLACK);
cout<<(" HELP ");
textcolor(BLACK);
textbackground(WHITE);
gotoxy(8,5);
cout<<"This software is used to create a telephone bill for the
customers. ";
gotoxy(8,7);
cout<<"There are two catagories of the customers. First catagories is
of";
gotoxy(8,9);
cout<<"Residential phones and second catagories is of Office phones.
Both";
gotoxy(8,11);
cout<<"the catagories have different charges of the telephone bill.
Charges";
gotoxy(8,13);
cout<<"of residential phones are 80 Paise per call and Charges of
Office ";
gotoxy(8,15);
cout<<"office phones are Rs. 1 per call. 150 call are free for each
catogory";
gotoxy(8,17);
cout<<"Total bill for is equal to 5% tax plus 100 rupees charges for
other";
gotoxy(8,19);
cout<<"charges. If bill is not paid before the paticular date then penalty
";
gotoxy(8,21);
cout<<"should also be given.";
getch();
}
Limitation of Project
Every project whether large or small has some limitations no matter however
diligently developed. In some cases limitations is small while in other cases they
may be broad also. The new system has got some limitations. Major areas where
modifications can be done are as follows:
Our system is not online so further it can be improved.
The security is limited so some additional arrangement could be made to
provide more security to the system.
There is no provision of complain handling so further it can be added.
Chellange of Project
This project gives an overview of the Telephone Billing System.
After entering into the project, user is left with several options via
a) The user can take new connections.
b) The user can view the existing lists of customers, which already have
telephone connections.
c) The user can of course see bills & take billing statements.
d) The user can also do several administrative works like managing rates
of calls, addition or modification of metered calls & customer entries.
It is a computerized system, which can be used very easily & effectively by the
Bibliography
[1] J. E. Dennis, Jr. and Robert B. Schnabel. Numerical Methods for Unconstrained
Optimization and Nonlinear Equations. Prentice Hall , Engelwood Cliffs, New Jersey 07632.,
1983.
[2] R. Fletcher. Practical Methods of Optimization. John Wiley and Sons., 1987.
[3] William H. Press, Brian P. Flannery, Seul A. Teukolvsky, and William T. Vetterling.
Numerical Recipes in C, The Art of Scientific Computing. Cambridge University Press, 1988.
[4] Margaret A. Ellis and Bjarne Stroustrup. The Annotated C++ Reference Manual. AT&T
Bell Laboratories, Murray Hill, New Jersey and Addison - Wesley Publishing Company, 1990.
[5] J. E. Dennis, Jr. and Jorge J. More. Quasi-newton methods, motivation and theory. SIAM
Review, 19:4689, 1977.
[6] Helmut Kopka and Patrick W. Daly. A Guide To LATEX. Addison Wesley, 1993. [7]
Bruce Eckel. Using C++. Osborne McGraw Hill, 1989.
[8] James O. Coplien. Advanced C++, Programming Styles and Idioms. Addison Wesley
Publishing Company, 1992.