ADVANTAGES OF COMPUTERISED SYSTEM

• Automatic generation of accounting documents like invoices, cheques and
statement of account;
• Faster and efficient in processing of information;
•With the larger reductions in the cost of hardware and software and
availability of user-friendly accounting software package, it is relatively
cheaper like maintaining a manual accounting system;
•More timely information can be produced;
•No more manual processing of the data- all automatically been posted to
the various ledgers/accounts and
•Many types of useful reports can be generated for management to make
decisions

DISADVANTAGES OF COMPUTERISED SYSTEM
•Power failure, computer viruses and hackers are the inherent problems of
using computerized systems;
•Once data been input into the system
, automatically the output are obtained hence the data being input needs to
be validated for accuracy and completeness, we should not forget concept of
GIGO (Garbage In(Input) Garbage out ( Output) and
•Accounting system not properly set up to meet the requirement of the
business

due to badly programmed or inappropriate software or hardware or

personnel problems can caused more havoc and
•Danger of computer fraud if proper level of control and security whether
internal and external are not properly been instituted.

CODING

/* ----------------------------------------------------------------------------------------*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>
{
char ph[10];
char name[30];
char add[40];
char type;
public :

. /* -----------------------------------------------------------------------------------------------------------------------------* FUNCTION TO DISPLAY THE MESSAGE* -------------------------------------------------------------------------------------------------------------------------------*/ void message(char mess[80]) { int l. l=strlen(mess). void modify(). void deleter(). gotoxy(2.void append().24). void display(). textbackground(BLACK). cout<<(" gotoxy(40-d. d=l/2. void list(). void help(). ").d. }cust. textcolor(WHITE+BLINK).24).

textbackground(WHITE). gotoxy(25. ."). textbackground(WHITE).5). cout<<("%s". while(1) { clrscr(). textcolor(WHITE). textbackground(BLACK).clreol(). } /* -----------------------------------------------------------------------------------------------------------------------------* MAIN FUNCTION * -------------------------------------------------------------------------------------------------------------------------------*/ void main() { textcolor(BLACK). cout<<("TELEPHONE BILLING-MEENU BHATT. char ch.ch1. textcolor(BLACK).mess).

cout<<" Q - Quit". textbackground(WHITE). switch(ch) { case ('Q') : textcolor(WHITE). gotoxy(25. cout<<" L .10). cout<<" M . exit(1). cout<<" H - Help". break. gotoxy(25.18).14).help(). clrscr(). cout<<" D - Display a Bill". message("Select your choice").display(). ch = toupper(ch).List of customers".8). textbackground(BLACK). gotoxy(25. case ('D') : cust. gotoxy(25. break. ch =getch(). gotoxy(25. gotoxy(40. case ('H') : cust.textcolor(BLACK). case ('L') : cust.16). .list().12).Modify a record".

gotoxy(25.9). case ('M') : ch1 = 'A' . gotoxy(25. textcolor(WHITE). gotoxy(25. gotoxy(25. textbackground(WHITE). cout<<" A - Append a record". cout<<("TELEPHONE BILLING"). switch(ch1) { case ('A') : cust. cout<<" M . gotoxy(25. ch1 = getch(). textcolor(BLACK). while(ch1 != 'Q') { clrscr(). ch1 = toupper(ch1). cout<<" Q - Quit".5). . cout<<" D - Delete a record".13). message("Select your option"). textbackground(BLACK).append().15). break.11).break.Change a record".

if (!fp) { . break. } } } } } /* -----------------------------------------------------------------------------------------------------------------------------* FUNCTION TO ADD THE CUSTOMER RECORD IN THE FILE* -------------------------------------------------------------------------------------------------------------------------------*/ void customer :: append() { char choice. break. fp. ios::app).modify(). case ('M') : cust.case ('D') : cust.dat".open("tphone. fstream fp.deleter().

cout<<"Name : ".23).3). } else . gets(name). gotoxy(3. gotoxy(25. getch(). return. textbackground(BLACK). if(strlen(name)==0) { gotoxy(2. gotoxy(3.5). cout<<("Name cannot be left blank\a"). clreol(). cout<<"Customer Record #". textcolor(WHITE+BLINK).5). while(1) { message("Enter the name").". } while(1) { clrscr(). message("Enter the customer record"). textcolor(BLACK).cout<<"Unable to open FILE.

if (ph != 0 ) break. } while(1) { message("Enter the address"). cin>>ph. gotoxy(25. : ". clreol(). cout<<"Address : ".break. } while(1) { gotoxy(3. gotoxy(25.7). if (strlen(add) != 0) break.6). } } . cout<<"Assigned Ph. gets(add).7).6). No. else { gotoxy(25.7). gotoxy(3.

default : fp.sizeof(cust)). break.11). } } } /* ------------------------------------------------------------------------------------------------------------------------------ . cin>>type. case ('0') : fp. cout<<"? ". cin>>choice.8).close().write((char *) this.sizeof(cust)). cout<<"catagory ( O/R ) : ".write((char *) this.close(). return. return. gotoxy(3. return. cout<<"1 : Save & Exit 2 : Save & Cont. case ('2') : fp. gotoxy(4. switch(choice) { case ('1') : fp.message("Enter O for Office and R for residential phone").close(). gotoxy(4.10). fp. 0 : Exit without save".

tax=0.0. fp. } while(choice != '0') { clrscr(). cin>>p.0. . fine=0.* FUNCTION TO DISPLAY THE CUSTOMER RECORD AND CALCULATE THE BILL* -------------------------------------------------------------------------------------------------------------------------------*/ void customer :: display() { char p[10]. fstream fp.0. ios::in).0. int found=0. bbill=0. fp.close(). ". getch(). int no.dat". cout<<"Please enter the Phone No. abill=0. gotoxy(3. if (!fp) { cout<<"Unable to open a file". float bill=0. return.open("tphone.20).0. char choice.

found = 0.if (!strcmp(p. gotoxy(3.sizeof(cust))) { if (found==1) break.5).p)) { clrscr().4). . cout<<("TELEPHONE BILLING").4). cout<<ph. cout<<"Assigned Ph. gotoxy(35. while (fp. if (!strcmp(ph. cout<<"Name : ". cout<<add. cout<<"Address : ". gotoxy(3. gotoxy(35."0")) return. textbackground(WHITE). cout<<name. : ". textcolor(WHITE). No.5).read((char *)this . textcolor(BLACK+BLINK) .2). gotoxy(28. fp.seekg(0). textbackground(BLACK).

. tax = (5*bill)/100. gotoxy(10. gotoxy(70. if (toupper(type) == 'O') bill = no * 1. cout<<type. else bill = no * .cout<<"Catagory ( O/R ) : ". cout<<"Bill". if ( no <= 150 ) bill = 0 .80. gotoxy(23. cout<<"___________". cin>>no. gotoxy(70.10 ).8).8).150.10).00 . gotoxy(10. cout<<tax. cout<<"No.11). of calls ".9). else { no = no . cout<<"5% Tax". } gotoxy(10.9). cout<<bill. gotoxy(10.

bbill = bill+tax+100. gotoxy(70.21). // Getting system Date getdate(&d). found = 1. dd = d. cout<<"100".21). abill = bbill+fine. gotoxy(10. gotoxy(70. cout<<"TOTAL BILL after ". gotoxy(10.11).cout<<"Duties". . fine = (bbill*5)/100.mm. cout<<dd<<"/"<<mm<<"/"<<yy. cout<<"Late Fine". cout<<abill.yy.15) . cout<<"TOTAL BILL before " .da_mon. yy = d. gotoxy(70. mm = d.da_year. int dd.17). cout<<dd<<"/"<<mm<<"/"<<yy. struct date d. cout<<fine.da_day.15). gotoxy(10. cout<<bbill.17). gotoxy(70.

cout<<"? ". case ('0') : return. gotoxy(4. getch().message("Press a Key"). cin>>choice. 0 : Exit ". } } fp.close().22). default : return."). } } message("Enter 1 or 2 to cont. cout<<"1 : Cont. switch(choice) { case ('1') : break. } /* -----------------------------------------------------------------------------------------------------------------------------* FUNCTION TO DISPLAY THE LIST OF THE CUSTOMERS* .

cout<<"List of Customers". } gotoxy(35. cout<<"Name". cout<<"*****************". fp. fp.".close(). if (!fp) { cout<<"Unable to open".-------------------------------------------------------------------------------------------------------------------------------*/ void customer :: list() { clrscr().3). gotoxy(40. fstream fp. cout<<"Phone No.5). int r. ios::in). .4). gotoxy(5.dat". gotoxy(65. cout<<"Catagory".4).4).open("tphone. gotoxy(1. getch(). gotoxy(35.2). return.

sizeof(cust))) { if (r >= 21) { message("Press a key"). cout<<"*****************". cout<<"Name". getch().4).3).read((char *) this. while (fp. cout<<"******************************************************* ************************".4). r=6.2).5). gotoxy(65. r=6. gotoxy(35. gotoxy(1.cout<<"******************************************************* ************************".". clrscr(). cout<<"List of customers". gotoxy(40. cout<<"Phone No. gotoxy(5.4). cout<<"Catagory". } . gotoxy(35.

} message("Press a key"). } /* -----------------------------------------------------------------------------------------------------------------------------* FUNCTION TO DELETE THE RECORD OF CUSTOMER FROM THE FILE* -------------------------------------------------------------------------------------------------------------------------------*/ void customer :: deleter() { char ch.r).r). gotoxy(40.r). cout<<name.close(). if (toupper(cust.gotoxy(5. fp. r++. getch(). .type) == 'O') cout<<"Office". cout<<ph. else cout<<"Residential". gotoxy(65.

cin>>p.fp.dat". to be deleted : ". getch(). int found=0. getch(). } clrscr(). if (!fp) { cout<<"Unable to open Telephone file". while (fp.read((char *) this.3).close(). fp.close(). fp. } temp.dat". ios::out).char p[10]. return.open("temp. temp. cout<<"Enter the Phone No. if (!temp) { cout<<"Unable to open Temporary file". gotoxy(5. if(!strcmp(p."0")) return. fstream temp. ios::in). sizeof(cust))) { . return.open("tphone.

} fp.close(). cout<<"Delete this record (Y/N) ". cout<<"Catagory "<<type. getch(). not found".sizeof(cust)). gotoxy(5. gotoxy(5. } else temp. .if (!strcmp(p.close(). gotoxy(6. cout<<"Name "<<name. cout<<"Address " <<add.5).6).ph)) { found = 1. if (toupper(ch) == 'N') temp. cin>>ch.sizeof(cust)).write((char *) this.write((char *) this. if (toupper(ch) == 'N') return. temp. if (!found) { cout<<"\n\nTelephone no.7). gotoxy(5.10). return.

} /* -----------------------------------------------------------------------------------------------------------------------------* FUNCTION TO MODIFY THE RECORD OF CUSTOMER FROM THE FILE* -------------------------------------------------------------------------------------------------------------------------------*/ void customer :: modify() { char ch. sizeof(cust))) fp.} fp.close(). temp.close(). fp. sizeof(cust)). temp.dat". ios::in). .dat". ios::out).open("tphone. while (temp.read((char *) this.write((char *) this.open("temp.

if (!fp) { cout<<"Unable to open Telephone file". ios::in).close(). getch(). if (!temp) { cout<<"Unable to open Temporary file".read((char *) this. return.dat". int found=0. if(!strcmp(ph.close(). fstream temp.fp. getch(). return. gotoxy(5. to be Modify : "."0")) return. sizeof(cust))) { .open("tphone. ios::out). cout<<"Enter the Phone No. fp.char p[10]. } clrscr().open("temp.3). } temp. temp.dat". while (fp. cin>>p. fp.

cout<<"Address " <<add. cout<<"Name gets(name). cin>>ch. if (strlen(name) != 0) break.5). if (toupper(ch) == 'Y') { gotoxy(3.16). : ".15). cout<<"Customer Record #". gotoxy(5. . cout<<"Modify this record (Y/N) ". gotoxy(5.13). cout<<"Catagory "<<type.7). } gotoxy(3. gotoxy(6. message("Enter the customer record"). cout<<"Name "<<name.if (!strcmp(p.6).ph)) { found = 1.10). while(1) { gotoxy(3. gotoxy(5.

} fp.cout<<"Address : ". if (toupper(ch) == 'N') return.18). return.17).close(). while(1) { gotoxy(3.close(). cout<<"catagory ( O/R ) : ". not found". . getch(). No.sizeof(cust)). : ". cout<<"Assigned Ph. cin>>type. cin>>ph. } } temp. gets(add). } message("Enter O for Office and R for residential phone"). if (!found) { cout<<"\n\nTelephone no.write((char *) this. if (ph != 0 ) break. gotoxy(3. temp.

textcolor(WHITE + BLINK). ios::out).dat".close(). temp. sizeof(cust)).} fp. while (temp.read((char *) this. sizeof(cust))) fp. temp. gotoxy(35.dat".write((char *) this. fp.open("tphone.close().open("temp.2). . ios::in). } /* -----------------------------------------------------------------------------------------------------------------------------* FUNCTION TO DISPLAY THE DISCRIPTION FOR THE PROJECT WORKING* -------------------------------------------------------------------------------------------------------------------------------*/ void customer :: help() { clrscr().

1 per call. Both". gotoxy(8. gotoxy(8. gotoxy(8. gotoxy(8. gotoxy(8. textbackground(WHITE).13).9).11). cout<<"There are two catagories of the customers. cout<<"This software is used to create a telephone bill for the customers. cout<<"office phones are Rs. gotoxy(8.19).textbackground(BLACK). cout<<"the catagories have different charges of the telephone bill. gotoxy(8.15). gotoxy(8. Charges". ". First catagories is of". cout<<"Total bill for is equal to 5% tax plus 100 rupees charges for other".17). textcolor(BLACK). cout<<"of residential phones are 80 Paise per call and Charges of Office ".5). 150 call are free for each catogory". cout<<"Residential phones and second catagories is of Office phones. . cout<<(" HELP ").7).

gotoxy(8.".cout<<"charges. If bill is not paid before the paticular date then penalty ". getch(). } SCREENS .21). cout<<"should also be given.

Sign up to vote on this title
UsefulNot useful