0% found this document useful (0 votes)
45 views46 pages

TELEPHONE

This document discusses the development of a telephone directory management system to address issues with the current manual system. The current system is prone to errors and takes a lot of time since it is done manually. The proposed system aims to automate the process using software for faster and more accurate management of telephone transactions and records. It will allow password protected access, calculate late fees automatically, and generate various reports. The objectives, advantages, and features of the proposed system are outlined.

Uploaded by

NG COMPUTER
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views46 pages

TELEPHONE

This document discusses the development of a telephone directory management system to address issues with the current manual system. The current system is prone to errors and takes a lot of time since it is done manually. The proposed system aims to automate the process using software for faster and more accurate management of telephone transactions and records. It will allow password protected access, calculate late fees automatically, and generate various reports. The objectives, advantages, and features of the proposed system are outlined.

Uploaded by

NG COMPUTER
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 46

TELEPHONE

INTRODUCTION

1.1 THE PROBLEM


Today so many people use the telephone, so the user of the telephone user mumber
increase very fast. The transactions processed manually take up a lot of time and thus
add to the problems of the management. And thus to keep track of the transactions of
the telephone management, a software package seems to be best way as it will speed
up the work time and lessen up the complexities of the management. In simple
language the project provides such user friendliness and easy understandability that
even a novice user will find it easy to use the package and grasp its essence.

In the current system so many problem like it is manual so it takes a lot of time to
complete the tasks. Every day so many people come into MTNL for enquiry etc. There
is always a long queue in the MTNL the books have also increased in number and
kind and hence keeping a record of them manually is very difficult

Throught this system we give the password for the protection of the system with a
password so that no one can manipulate the records. This is a used in the software
because only the authority person is only will be open the data file.
1.2 Needs for the proposed system:
1. Calculation of fine:
The new proposed system should calculate fine if book is returned late and it should
be very fast and accurate.
2. Speed:
The new proposed system should be very fast with hundred percent accuracy so as to
save time.
3. Manpower:
The new proposed system should utilize less manpower, so that less people can do the
large work and that too with accuracy and efficiently.

4. Password protection :
The new system should be very secure. No unauthentic person should be able to
access the system and modify or change any record.
5. User friendly menu :
The system should have a very simple and easy to use menu system in order to make
even a novice user sit and use it.

1.3 Advantages and disadvantages of current system

The current system has many limitations, which are discussed below:
 The first problem is that it is a manual system are a lot of chances of mistake.
 The accuracy level in this system is comparatively very low as everything is
manual.
 This system created a huge pile of registers for future reference, as everything is
with done with pen and paper.
1.4 OBJECTIVE

The set of the objectives that the software caters to are as stated below:
 Electronically handling of monthly business transactions to enhance the accuracy,
flexibility, reliability and to remove the human errors.

 To permit the indiscipline of entering vouchers at random and to permit easy


retrieval of any information.

 To provide the normal call charges, free call, metered callused rates, airtime
charges, special landline sms and callforwarding,clip facility and further the
Statutory Statements generated thereon, customer bill

 To keep track of outstanding receivables or payables on a bill-to-bill basis.

 To provide monthly closing balance or transactions of any customer Account.

 To provide memo register to ensure that any important business transactions is not
forgotten.

 To provide the efficient, accurate, reliable, fast, and robust structure that can handle
business any number of business transactions.
PROBLEM SELECTION

DFD ( Data Flow Diagram )

1 2
User
User Validate
Login Login
User table

Record
3
Transactio
ns
customer
Maintenan
ce
6

View
4
Reports
billing
Mechanis
m
ONE LEVEL DFD

DFD ( Data Flow Diagram )

1.1 1.2
User User Validate
Login Login

Transaction table

2
User table
Enter
monthly
Transactions

View
Reports

3.2
3.1
View
View Monthly
Monthly bills metered calls

3.4
3.3 3.5
View
View Credit pending View
Debit balances Surcharge
Balance rate
DATA MODULARISTION
This phase can be best understood with help of these figures, these figures are made
keeping into consideration all the aspects and hence are self explanatory:
1) Main Module
2) Show Module
3) Delete Module
4) Report
START

Add record

See record

MENU Enquiry

Modification

Delete

Exit
Input Ch

If Y
1
Ch=1

If Y
2
Ch=2

If Y 3
Ch=3

If Y 4
Ch=4
STOP
N N

6 Y If N If Y 5
Ch=6 Ch=5
This option is depicting the ADD Recode module

Input bill information.

Open file INFOR.dat in append mode.

write data in file.

MENU
This option is depicting the Show module

Input member information.

Open file INFOR.dat in read mode.

Read data in file.

MENU
This option is depicting the Search module

Input telephone no

Open file INFOR.dat in read


mode.

read data in file.

MENU
This option is depicting the Modify module

Input telephone no.

Update book status in inform


file.

Calculate fine.

Open file INFOR.dat in


read/write mode.

Update status in file.

MENU
This option is depicting the Delete Module

Open Inform file in read only


mode.

Read data from file and Display


bill information.

Delete data of the bill form the


inform file

MENU
Source code

#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>
#include <conio.h>
#include <cwchar>
#include <windows.h>
#define _WIN32_WINNT 0x0601

using namespace std;

class directory
{
int PhNo;
char fname[50], lname [50];

public:
string getpword()
{
char ch;
string pass="";
cout << "Please Enter the Password: ";
oo:
ch=getch();
if(ch==8)
{
goto oo;
}
while(ch!=13)
{
if(ch==8)
{
if(pass.size()==0)
{
goto ps;
}
pass.erase(pass.size()-1);
cout << "\b \b";
ps:
goto pp;
}
pass.push_back(ch);
cout << "*";
pp:
ch=getch();
}
return pass;
}
int check(string a)
{
int flag=0;
string b;
fstream f1("Accounts.dir",ios::in);
while(f1)
{
f1 >> b;
if(b==a)
{
flag = 1; break;
}
}
f1.close();
if(flag==1)
{
cout << "\nSorry! Username already exists. \nPlease try another: ";
return 1;
}
return 0;
}

int SignIn()
{
string uname, password, struname, strpassword, line;
ghi:
fstream file1("Accounts.dir");
int flag=0, nextLoc=0;
system("cls");
cout << "\n\n\t\t-----------TELEPHONE DIRECTORY-------------\n\n";
cout << "Please Enter Your Username: ";
cin >> struname;
if (struname=="Admin")
{
return 2;
}
if (struname=="admin")
{
return 3;
}
while (! file1.eof() )
{
getline (file1,line);
nextLoc=line.find(" ");
uname=line.substr(0,nextLoc);
line = line.substr(nextLoc+1,line.length());
password=line;
if(uname==struname)
{
flag=1;
break;
}
}

file1.close();
if(flag==1)
{

def:
strpassword=getpword();
if(strpassword==password)
{
cout << "Sign-In Succesful.";
}
else
{
cout << "\nWrong Password! ";
goto def;
}
}

else
{
cout << "\n\nYour Username was not Found in our Database.\nPlease
Sign-Up or Enter correct Username";
cout << "\nPress <1> To Sign-Up OR\n <2> To Sign-In Again\n";
int choice1;
cin >> choice1;
if(choice1==1)
{
return 1;
}
else
{
goto ghi;
}
}
return 0;
}

void SignUp()
{ string uname, struname, line, Password;
int flag;
system("cls");
cout << "\n\n\t\t-----------TELEPHONE DIRECTORY-------------\n\n";
fstream file1("Accounts.dir",ios::in|ios::out|ios::app);
cout << "Please Enter an Username: ";
cv:
cin >> struname;
flag = check(struname);
if(flag==1)
{
goto cv;
}
cout << "Please Enter a Password: ";
cin >> Password;
file1 << "\n" << struname << " " << Password;
cout << "\nAccount Created Successfully\n\n";
system("pause");
return;
}

void GetDetails()
{
string fname, lname, tnumber;
char choice = 'y';
fstream myfile("Directory.dir",ios::app);
while(choice=='Y'||choice=='y')
{
system("cls");
cout << "\n\n\t\t-----------TELEPHONE DIRECTORY-------------\n\n";
cout << "Enter First Name : ";
cin >> fname;
myfile << fname << " ";
cout << "\nEnter Last Name : ";
cin >> lname;
myfile << lname << " ";
cout << "\nEnter Phone Number : ";
cin >> tnumber;

myfile << tnumber << "\n";


cout << "\nDo you want to enter more? (y/n)";
cin >> choice; cout << "\n";
}
myfile.close();
}

void SearchAndDisplay()
{
string line;
string fName,lName,tNumber, strFName, strLName;
char choice;
int flag=0;
int nextLoc=0;
system("color F0");
system("cls");
do{
cout << "\n\n\t\t-----------TELEPHONE DIRECTORY-------------\n\n";
flag=0;
ifstream myfile ("Directory.dir");
if (myfile.is_open())
{
cout<<endl<<"Enter First Name: ";
cin>>strFName;
cout<<"Enter Last Name: ";
cin>>strLName;
while (! myfile.eof() )
{
getline (myfile,line);
nextLoc=line.find(" ");
fName=line.substr(0,nextLoc);
line = line.substr(nextLoc+1,line.length());
nextLoc=line.find(" ");
lName=line.substr(0,nextLoc);
line = line.substr(nextLoc+1,line.length());
tNumber = line;
if(fName==strFName && lName==strLName)
{
cout<<"\nFound!!"<<endl;
cout<<endl<<"First Name: "<<fName<<"\
n"<<"Last Name: "<<lName<<"\n"<<"Telephone Number: "<<tNumber<<endl ;
flag=1;
break;
}
}
}
else
{
cout << "Unable to open file"<<endl;
exit(0);
}
if(flag==0)
{
cout<<"Not Found...Sorry."<<endl;
}
cout << "\nDo you want to enter more?(y/n) ";
cin >> choice;
system("cls");
}while(choice=='y');
return;
}

void Delete()
{
system("cls");
string line, fName, lName, strLName, strFName, tNumber;
int nextLoc=0,flag=0;
cout << "\n\n\t\t-----------TELEPHONE DIRECTORY-------------\n\n";
cout << "Please enter the first name of record you want to delete: ";
cin>>strFName;
cout << "\nPlease enter the last name of record you want to delete: ";
cin>>strLName;
ifstream myfile;
ofstream temp;
myfile.open("Directory.dir");
temp.open("temp.dir");
while (!myfile.eof())
{
getline (myfile,line);
nextLoc=line.find(" ");
fName=line.substr(0,nextLoc);
line = line.substr(nextLoc+1,line.length());
nextLoc=line.find(" ");
lName=line.substr(0,nextLoc);
line = line.substr(nextLoc+1,line.length());
tNumber = line;
if(!(fName==strFName && lName==strLName))
temp << fName <<" "<< lName <<" "<< tNumber<< endl;
else
flag++;

}
if(flag==0)
{
cout<<"\nRecord not found!!\n\n";
goto afg;
}
cout << "The record with the name " << strFName <<" "<<strLName<< " has been
deleted " << endl;
myfile.close();
temp.close();
remove("Directory.dir");
rename("temp.dir", "Directory.dir");
afg:
return;
}
void mod()
{
system("cls");
system("color F0");
string line, fName, lName, strLName, strFName, tNumber;
int nextLoc=0,flag=0;
cout << "\n\n\t\t-----------TELEPHONE DIRECTORY-------------\n\n";
afgh:
cout << "Please enter the first name of record you want to modify: ";
cin>>strFName;
cout << "\nPlease enter the last name of record you want to modify: ";
cin>>strLName;
ifstream myfile;
ofstream temp;
myfile.open("Directory.dir");
temp.open("temp1.dir");
while (!myfile.eof())
{
getline (myfile,line);
nextLoc=line.find(" ");
fName=line.substr(0,nextLoc);
line = line.substr(nextLoc+1,line.length());
nextLoc=line.find(" ");
lName=line.substr(0,nextLoc);
line = line.substr(nextLoc+1,line.length());
tNumber = line;
if(!(fName==strFName && lName==strLName))
temp << fName <<" "<< lName <<" "<< tNumber<< endl;
else
flag++;

}
if(flag==0)
{
cout<<"\nRecord not found!! Try Again.\n\n";
goto afgh;
}
myfile.close();
temp.close();
remove("Directory.dir");
rename("temp1.dir", "Directory.dir");

string fname2, lname2, tnumber2;


fstream myfile2("Directory.dir",ios::app);
cout << "\n\nEnter New First Name : ";
cin >> fname2;
myfile2 << fname2 << " ";
cout << "\nEnter New Last Name : ";
cin >> lname2;
myfile2 << lname2 << " ";
cout << "\nEnter New Phone Number : ";
cin >> tnumber2;

myfile2 << tnumber2;


myfile2.close();

return;
}
};
int main()
{
directory d;
int choice, choice3, returnedValue;
char choice2='y', choice4='y';
string pword;
dkj:
system("cls");
cout << "\n\n\t\t-----------TELEPHONE DIRECTORY-------------\n\n";
cout << "Please Sign-In or Sign-Up to Continue\n\n\t1. Sign-In to an Existing
Account\n\t2. Create a new Account\n\t3. Exit\n";
cout << "\nPlease Enter your choice: ";
cin >> choice3;
if(choice3==1)
{
returnedValue=d.SignIn();
if(returnedValue==1)
{
d.SignUp();
}
else if(returnedValue==2)
{
yz:
pword=d.getpword();
if(pword=="Root")
{
system("cls");
cout << "Admin Signed In\n";
system("pause");
goto mno;
}
else
{
cout << "\nPassword Incorrect! Please Enter Again: ";
goto yz;
}
}
else if(returnedValue==3)
{
vwx:
pword=d.getpword();
if(pword=="root")
{
system("cls");
cout << "Admin Signed In\n";
system("pause");
goto mno;
}
else
{
cout << "\nPassword Incorrect. Please Enter Again: ";
goto vwx;
}
}
}

else if(choice3==2)
{

jkl:
d.SignUp();
}

else
{
exit(0);
}

while(choice2=='Y'||choice2=='y')
{
system("color F0");
system("cls");
cout << "\n\n\t\t-----------TELEPHONE DIRECTORY-------------\n\n";
cout <<"Do you want to \n\n\t1.View Existing Directories \n\t2.Enter New
Directories\n\t3.Delete Existing Directories\n\t4.Modify Existing Directories\n\t5.Log
Out\n\t6.Log Out and Exit\n";
cout<<"\nPlease enter your choice: ";
abc:
cin >> choice;

switch (choice)
{
case 1: d.SearchAndDisplay(); break;
case 2: d.GetDetails(); break;
case 3: d.Delete();break;
case 4: d.mod();break;
case 5: cout<<"\nLogged out successfully!\n";
system("pause");
goto dkj;
case 6: exit(0); break;
default: cout << "\nWrong Input! Try Again... "; goto abc;
}

}
goto stu;
mno:
system("color F0");
system("cls");
cout << "\n\n\t\t-----------TELEPHONE DIRECTORY-------------\n\n";
cout << "Do you want to \n\n\t1.Enter New Directories\n\t2.View Existing
Directories\n\t3.Delete Existing Directories\n\t4.Modify Existing Directories\n\t5.Log
Out\n\t6.Log Out and Exit\n";
cout<<"\nPlease enter your choice: ";
pqr:
cin >> choice;
lok:
switch (choice)
{
case 1: d.GetDetails(); break;
case 2: d.SearchAndDisplay(); break;
case 3: d.Delete();break;
case 4: d.mod();break;
case 5: cout<<"\nLogged out successfully!\n";
system("pause");
goto dkj;
case 6: exit(0);
default: cout << "\nWrong Input! Try Again... "; goto pqr;
}
cout << "Do you want to continue? (y/n) : ";
choice4=getch();
if(choice4=='Y'||choice4=='y')
{
goto lok;
}
else
goto mno;

stu:
exit(0);
}

Screen of Input and Output


Screen open when the open the project:-
Screen open when the system ask for password:-
Screen open when enter the write password:
Screen open for choice:-
Screen open when the enter the wrong password:-
Screen open when you want to continue

Screen open when the option 1 add is choice


Screen open when the option 3 search is choice
Screen open when the option 4 modification is choice

Screen open when the option 5 delete is choice


DATA FLOW DIAGRAMS (DFDs)
A Data Flow Diagram is a tool that traces the flow of data in a system. The Data Flow
Diagram is made up of a set of four symbols called as the external entities, data stores,
data flows and the processes. The zero level data flow diagram also popularly called as
the context level data flow diagram is depicted below for our software.
FAMS DATABASE

Telephone GENERATE
USER billing REPORTS
SYSTEM
(tbs)
CONTEXT LEVEL DIAGRAM
SYSTEM REQUIREMENT
HARDWARE REQUIREMENTS

PROCESSOR Pentium II 400 MHz.


HARD DISK DRIVE 4 GB
RAM 64 MB
CACHE 512 KB

SOFTWARE ENVIRONMENT OF THE PROJECT


PLATFORM WINDOW 98
FRONT END Turboc c++ ver 3.0
BACK END Dos file support

TOOLS/PLATFORM, LANGUAGES TO BE USED


Software and hardware specification as the name suggests, tells us about
the various characteristics of the software and the hardware environment
used i.e. the development environment used. Here I specify various
software languages, supporting tools that have been used for the
development of the system. These tools and the languages have been used
because of their relative ease of understand and personal interest of the
team developing the project.

SOFTWARE LANGUAGES USED


In the development of a project the selection of an appropriate programming language
and a platform is of primary importance. The major part of credit of success of a
project goes to the software environment chosen by the developer. Selecting a
language from the ocean of the languages is very difficult. A developer has to consider
the various features and functionalities that a particular language can provide him/her
how easily and successfully the requirements of a user can be fulfilled depend on the
s/w language chosen. More over the developer also has to take care of the various
facilities, he can use. In the development of this application, it has been taken into
great consideration that server overhead should be low as far as possible.

CONCLUSION
C++ is one of the most widely used development tools on the market today. C++ is a high level, compiler
and high shell language. In addition, c++ has the feature of object-oriented programming.
A language can be classified as low-level language and high-level language. Program written the low
level language is dependent on the architecture of the computer. In other words, the low level languages
are machine dependent. Machine language and Assembly language are the low-level languages. High-
level language uses English like statements to give an instruction to the machine. These instructions are
machine independent. The same source program can be used on another machine, which is architecturally
different from the machine in which the source program is written with a few or no changes. In other
words, the high level languages are machine independent. A high level language has more readability
than low-level language. Programming in high-level language is much easier than low-level language.

A high level language uses the translators to translate the source program in to machine executable form
because the computer cannot understand the high level language. It can understand only binary language.
A high-level language program can be translated using interpreter or compiler. Interpreter takes the
source program line by line as input, translates one line at a time into executable form if it has no errors
otherwise displays an error message. Compiler first translates the source program into object program if
there is no errors if there are errors in the program it displays the list of the errors. After translating the
object program can be executed. Each time the program execution starts the interpreter interprets the
source program but compiler does not. C++ is an compiler language. It also has the feature of
compilation. When one want to create .exe file c++ first compile the source program then translates it
into executable program.

A language provides either low visual or high visual. Earlier high level languages like Pascal, Basic,
Fortran, COBOL, etc. provides the low-visual because it uses the character based interface to the interact
with the user.
The c++ provide various facility like encapsulation and polymorphism it also provide various features
like exception handling mechanism it also provide runtime object error correction
Process logic
SCOPE OF THE PROJECT
The problem with the current system is that the system for addition of new
member ,deletetion of member is manual and hence it takes a lot of time to complete
the tasks. One has to wait for long in order foe getng any information. There is always
a long queue in the MTNLThe user of the MTNL day to day increased.
This software which can help him in order to give a quick report of the list of
members.
He also needs a protection of the system with a password so that no one can
manipulate the records.
This project can be made be internet based so that the member of the MNTL can easly
get any inforation that he wants to issue and accordingly manage his schedule.

REFERENCES
1. OBJECT ORINTED PROGRAMMING USING C++.
E. BALAGURUSWAMY.

2. OBJECT ORIENTED PROGRAMMING IN C++ BARAKAKATI AND


NABAJOYOTY.

3. C++ PROGRAME DESIGN.


COHOOM AND DAVIDSON

4. LET US C++
YASHWANT KANITKER

5. OBJECT-ORIENTED MODELING AND DESIGN


JAMES RUMBAUGH
6. THE COMPLETE REFERENCE
HERBERT SCHILDT

You might also like