Professional Documents
Culture Documents
Kurukshetra University: A Project Report ON
Kurukshetra University: A Project Report ON
PROJECT REPORT
ON
SUBMITTED TO
KURUKSHETRA UNIVERSITY
[2008-2009]
SUPERVISOR
This is certified that Rohit Khurana, s/o Sh. Suresh
Kumar Khurana is bonafied student of this college.
Sh. Ashwani
Gupta
H.O.D. (Computer Science)
I.B. (P.G.) College, Panipat
COLLEGE CERTIFICATE
He bears a good moral character & I wish him all the success for
future life.
CLASS : B.C.A.III
I am very grateful to Sh. Ashwani Gupta for his valuable help and
guidance.
ROHIT
KHURANA
B.C.A.III
INTRODUCTION TO C++
PROJECT
Increased Efficiency:-
One main objective of the
proposed project is increased efficiency of manpower with
computer in various works. It does not require any creativity,
which can exhaust a man, very soon.
Reduction Of Manpower:-
It serves a lot of deskwork, as tHise
are no efforts in manipulating records.
Degree of accuracy:-
The computerized system gives the high
degree of accuracy than manual system.
Save memory:-
In computerized system we are able to save large
number of information is required.
Modifications:-
In present system we can easily modify the
information about any transaction.
Updating:-
With computerized system we can easily
update the system by the information.
FEASIBILITY STUDY
#include<conio.h>
#include<fstream.h>
#include<stdio.h>
#include<dos.h>
#include<string.h>
#include<process.h>
#include<graphics.h>
fstream file1,file2,file3;
class cyber
public:
char cha;
int p,k;
class info
public:
int noprn,noscan;
long phone;
}inf;
public:
int h,at_rate;
h=x;
at_rate=v;
void tempcust()
gotoxy(22,8);
cin>>h;
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
cout<<" Press any key to continue...";
int tempamount=0;
tempamount+=at_rate*thrs;
return(tempamount);
}temp;
public:
int type,hr,wrate,mrate,yrrate;
wrate=w;
mrate=m;
yrrate=y;
}
void member();
}mem;
void input();
int search(long);
void pro(int,int);
}cafe;
void cyber::input(void)
clrscr();
k++;
gotoxy(26,2);
cout<<k;
gotoxy(25,3);
cout<<" ----------";
gotoxy(22,5);
gets(cafe.inf.name);
gotoxy(22,7);
gets(cafe.inf.add);
gotoxy(22,9);
cin>>cafe.inf.phone;
gotoxy(22,11);
gets(cafe.inf.email);
gotoxy(18,23);
cin>>cafe.cha;
cafe.inf.noprn=0;
cafe.inf.noscan=0;
clrscr();
if(cha=='Y'||cha=='y')
{
gotoxy(22,3);
cin>>cafe.inf.noprn;
gotoxy(22,5);
cin>>cafe.inf.noscan;
p=ps-expen;
void cyber::meminfo::member()
clrscr();
gotoxy(26,2);
gotoxy(25,3);
cout<<"------------------";
gotoxy(28,5);
gotoxy(30,6);
gotoxy(32,7);
gotoxy(24,13);
cin>>type;
switch(type)
cin>>hr;
//memcost+=hr*wrate;
break;
cin>>hr;
//memcost+=hr*mrate;
break;
cin>>hr;
//memcost+=hr*yrrate;
break;
int memcost=0;
memcost+=hours*rate;
return (memcost);
class mod
public:
int mainbill,elecbill,ispbill,printrate,scanrate,dd,yy;
char kb,code[15],choice2;
mainbill=mb;
elecbill=eb;
ispbill=ispb;
printrate=p;
scanrate=s;
void modbill();
}md;
void mod::modbill(void)
int res=0;
// res=password();
if(res==1)
clrscr();
textcolor(MAGENTA);
gotoxy(26,2);
gotoxy(26,3);
cout<<"---------------------";
gotoxy(23,6);
cin>>ispbill;
gotoxy(23,8);
cin>>mainbill;
gotoxy(23,10);
cin>>elecbill;
gotoxy(23,12);
cin>>printrate;
gotoxy(23,14);
gotoxy(23,16);
cin>>cafe.temp.at_rate;
gotoxy(23,20);
cin>>choice2;
if(choice2=='y'||choice2=='Y')
clrscr();
gotoxy(25,2);
cin>>cafe.mem.wrate;
gotoxy(25,4);
cin>>cafe.mem.mrate;
gotoxy(25,6);
cin>>cafe.mem.yrrate;
}
char choice6;
public:
void dis();
void caferate();
}show;
void display::dis()
gotoxy(27,4);
cout<<"Name :";
puts(cafe.inf.name);
gotoxy(27,6);
cout<<"Address :";
puts(cafe.inf.add);
gotoxy(27,8);
cout<<"Phone :";
cout<<cafe.inf.phone;
gotoxy(27,10);
cout<<"Email :";
puts(cafe.inf.email);
gotoxy(27,12);
cout<<cafe.temp.h;
gotoxy(27,14);
cout<<cafe.inf.noprn;
gotoxy(27,16);
cout<<cafe.inf.noscan;
void display::caferate()
{
clrscr();
gotoxy(35,2);
gotoxy(26,2);
gotoxy(25,3);
cout<<" -------------------------";
gotoxy(26,6);
cout<<ispbill;
gotoxy(26,8);
cout<<mainbill;
gotoxy(26,10);
cout<<elecbill;
gotoxy(26,12);
cout<<printrate;
gotoxy(26,14);
cout<<scanrate;
gotoxy(26,16);
cout<<cafe.temp.at_rate<<endl;
gotoxy(28,18);
cout<<cafe.p;
gotoxy(23,20);
cin>>choice6;
if(choice6=='y'||choice6=='Y')
clrscr();
gotoxy(25,24);
getch();
gotoxy(35,2);
cout<<" Page 2 Of 2";
gotoxy(26,2);
gotoxy(25,3);
cout<<" -------------------------";
gotoxy(25,6);
cout<<cafe.mem.wrate;
gotoxy(25,8);
cout<<cafe.mem.mrate;
gotoxy(25,10);
cout<<cafe.mem.yrrate;
//void anu();
void main()
{
clrscr();
int
trec=0,sch,exp,pos,result,o,memberamt=0,t,mrec,choice,psam=0
,temamt=0,offset,totalps=0,hit,record=0,position=0,choice3,choi
ce4,choice5,i;
char choice1,sname[20];
long sph;
do
clrscr();
file1.open("temp.sav",ios::in|ios::out|ios::ate);
if(!file1)
break;
file1.seekg(0,ios::end);
pos=file1.tellg();
trec=0;
trec=(pos/sizeof(cyber));
file1.close();
file2.open("mem.sav",ios::in|ios::out|ios::ate);
if(!file2)
getch();
exit(0);
file2.seekg(0,ios::end);
position=file2.tellg();
record=(position/sizeof(cyber));
file2.close();
// textcolor(12);
int gd=DETECT,gm;
initgraph(&gd,&gm,"\\tc\\bgi");
setcolor(11);
settextstyle(6,HORIZ_DIR,1);
setcolor(12);
settextstyle(2,HORIZ_DIR,5);
// gotoxy(1,2);
// textcolor(2);
gotoxy(17,3);
cout<<pos<<endl;
gotoxy(17,4);
cout<<trec<<endl;
settextstyle(6,HORIZ_DIR,1);
// textcolor(12);
setcolor(11);
// cout<<endl;
setcolor(12+128);
settextstyle(2,HORIZ_DIR,5);
// textcolor(128);
gotoxy(17,6);
cout<<position<<endl;
// textcolor(BLINK);
gotoxy(17,7);
cout<<record;
/*int gdriver=DETECT,gmode;
initgraph(&gdriver,&gmode,"";
setcolor(90);
putpixel(w,65,3*w);
putpixel(w,75,2*w);
}*/
//disperse
/* int gd=DETECT,gm;
initgraph(&gd,&gm,"";
getpalette(&pal);
for(int i=0;i<25;i++)
setrgbpalette(pal.colors[i],i*5,i*8,i*3);
setcolor(12);
settextstyle(5,HORIZ_DIR,7);
outtextxy(200,155,"project";
outtextxy(250,215,"on";
for(int p=26;p>=0;p--)
for(int i=80;i<650;i++)
for(int j=190;j<450;j++)
{
int x=getpixel(i,j);
if(x<p);
int t=getpixel(i,j+1);
if(t<x)
putpixel(i,j+1,getpixel(i,j)-1);
t=getpixel(i,j-1);
if(t<x)
putpixel(i,j-1,getpixel(i,j)-1);
t=getpixel(i+1,j);
if(t<x)
putpixel(i+1,j,getpixel(i,j)-1);
t=getpixel(i-1,j);
if(t<x)
putpixel(i-1,j,getpixel(i,j)-1);
}
break;
getch();
setcolor(9);
settextstyle(8,HORIZ_DIR,5);
// gotoxy(30,2);
settextstyle(2,HORIZ_DIR,4);
// gotoxy(30,2);
// outtextxy(250,15,"\t\t\t\t\t\t\t\t\t\t\t";
setcolor(12);
settextstyle(5,HORIZ_DIR,3);
// gotoxy(30,3);
// gotoxy(24,5);
// gotoxy(24,6);
// gotoxy(24,7);
// anu();
// gotoxy(24,8);
// gotoxy(24,9);
// gotoxy(24,10);
outtextxy(250,270,"6. Search.");
// gotoxy(24,11);
outtextxy(250,300,"7. Test For Error(NOT FOR USER).");
// gotoxy(24,12);
gotoxy(60,25);
settextstyle(7,HORIZ_DIR,1);
setcolor(10);
// gotoxy(28,27);
textcolor(14);
cin>>choice;
getch();
closegraph();
switch(choice)
case 1: start:
clrscr();
gotoxy(25,12);
cout<<"1.Temporary";
gotoxy(25,13);
cout<<"2.Member ";
gotoxy(28,20);
cin>>t;
switch(t)
case 1: file1.open("temp.sav",ios::in|ios::out|ios::ate);
if(!file1)
break;
cafe.k=trec;
clrscr();
gotoxy(27,9);
textcolor(GREEN);
cout<<trec;
cout<<" Existing Customer Records In File. ";
gotoxy(25,10);
textcolor(RED);
getch();
cafe.input();
trec++;
//temamt+=cafe.temp.tempcust();
cafe.temp.tempcust();
offset=((trec-1)*sizeof(cyber));
file1.seekp(offset,ios::beg);
file1.write((char*)&cafe,sizeof(cyber));
//
psam+=(cafe.inf.noprn*md.printrate)+
(cafe.inf.noscan*md.scanrate);
file1.close();
break;
case 2: file2.open("mem.sav",ios::in|ios::out|ios::ate);
if(!file2)
cout<<" Fatal Error : File Stream is inaccesible ";
cafe.k=record;
gotoxy(27,9);
textcolor(YELLOW);
cout<<record;
gotoxy(25,10);
textcolor(YELLOW);
getch();
cafe.input();
record++;
cafe.mem.member();
offset=((record-1)*sizeof(cyber));
file2.seekp(offset,ios::beg);
file2.write((char*)&cafe,sizeof(cyber));
//
psam+=(cafe.inf.noprn*md.printrate)+
(cafe.inf.noscan*md.scanrate);
file2.close();
break;
default:clrscr();
gotoxy(15,23);
textcolor(RED);
gotoxy(23,24);
textcolor(LIGHTGREEN);
hit=getch();
if(hit=='q'||hit=='Q')
exit(0);
else
goto start;
getch();
break;
case 2: textcolor(BROWN);
gotoxy(27,2);
gotoxy(27,3);
gotoxy(27,5);
gotoxy(27,6);
gotoxy(27,10);
cout<<"\tEnter choice...";
cin>>choice5;
if(choice5==1)
if(!trec)
clrscr();
textcolor(LIGHTBLUE+BLINK);
gotoxy(2,2);
cout<<" No Record Has Been Added Yet.";
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
getch();
break;
else
clrscr();
gotoxy(28,12);
cin>>mrec;
if(mrec>trec)
textcolor(LIGHTBLUE);
gotoxy(2,2);
gotoxy(2,3);
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
getch();
break;
else
clrscr();
gotoxy(27,2);
gotoxy(27,3);
cout<<"-----------------";
file1.open("temp.sav",ios::in|ios::out|ios::ate);
if(!file1)
{
break;
offset=((mrec-1)*sizeof(cyber));
file1.seekg(offset,ios::beg);
file1.read((char*)&cafe,sizeof(cyber));
show.dis();
gotoxy(29,24);
cin>>choice1;
if(choice1=='y'||choice1=='Y')
clrscr();
gotoxy(26,2);
cafe.input();
file1.seekp(offset,ios::beg);
file1.write((char*)&cafe,sizeof(cyber));
gotoxy(26,12);
textcolor(GREEN+BLINK);
gotoxy(26,24);
textcolor(LIGHTGREEN);
file1.close();
else
if(choice5==2)
if(!record)
clrscr();
textcolor(LIGHTBLUE+BLINK);
gotoxy(2,2);
cout<<" No Record Has Been Added Yet.";
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
getch();
break;
else
clrscr();
gotoxy(28,12);
cin>>mrec;
if(mrec>record)
textcolor(LIGHTBLUE);
gotoxy(2,2);
gotoxy(2,3);
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
getch();
break;
else
clrscr();
gotoxy(27,2);
gotoxy(27,3);
cout<<"-----------------";
file2.open("mem.sav",ios::in|ios::out|ios::ate);
if(!file1)
{
break;
offset=((mrec-1)*sizeof(cyber));
file2.seekg(offset,ios::beg);
file2.read((char*)&cafe,sizeof(cyber));
show.dis();
gotoxy(29,24);
cin>>choice1;
if(choice1=='y'||choice1=='Y')
clrscr();
gotoxy(26,2);
cafe.input();
file2.seekp(offset,ios::beg);
file2.write((char*)&cafe,sizeof(cyber));
gotoxy(26,12);
textcolor(GREEN+BLINK);
gotoxy(26,24);
textcolor(LIGHTGREEN);
file2.close();
getch();
break;
case 3: textcolor(YELLOW);
show.caferate();
gotoxy(28,24);
cin>>choice1;
if(choice1=='y'||choice1=='Y')
{
md.modbill();
clrscr();
gotoxy(23,12);
textcolor(GREEN+BLINK);
gotoxy(24,24);
textcolor(LIGHTGREEN);
getch();
break;
case 4 :
textcolor(BROWN);
gotoxy(27,2);
cout<<"Delete ";
gotoxy(27,3);
gotoxy(27,6);
gotoxy(27,10);
cout<<"\tEnter choice...";
cin>>choice5;
if(choice5==1)
if(!trec)
clrscr();
textcolor(LIGHTBLUE+BLINK);
gotoxy(2,2);
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
break;
else
clrscr();
gotoxy(28,12);
cin>>mrec;
if(mrec>trec)
textcolor(LIGHTBLUE);
gotoxy(2,2);
cout<<trec;
gotoxy(2,3);
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
getch();
break;
else
clrscr();
gotoxy(27,2);
gotoxy(27,3);
cout<<"-----------------";
file1.open("temp.sav",ios::in|ios::out|ios::ate);
file3.open("temp1.sav",ios::in|ios::out|ios::ate);
if(!file1)
break;
}
offset=((mrec-1)*sizeof(cyber));
file1.seekg(offset,ios::beg);
file1.read((char*)&cafe,sizeof(cyber));
show.dis();
gotoxy(29,24);
cin>>choice1;
if(choice1=='y'||choice1=='Y')
clrscr();
file1.seekg(0,ios::beg) ;
int n =1;
while(file1.read((char *)&cafe,sizeof(cyber)))
if(mrec!=n)
offset=((n-1)*sizeof(cyber));
file3.seekp(offset,ios::beg);
file3.write((char *)&cafe,sizeof(cyber));
n++;
file1.close();
file3.close();
remove("temp.sav");
rename("temp1.sav","temp.sav");
file1.seekg(0,ios::end);
pos = file1.tellg() ;
trec=0;
trec = (pos/sizeof(cyber));
file1.close();
getch();
break;
case 5: clrscr();
textcolor(YELLOW);
gotoxy(29,2);
cout<<"Display Menu";
gotoxy(29,3);
cout<<"-------------";
gotoxy(23,5);
gotoxy(25,6);
gotoxy(27,7);
cout<<"3.Cafe Info?";
gotoxy(25,17);
cin>>o;
switch(o)
case 1: clrscr();
gotoxy(26,2);
cout<<"Customer Type:";
gotoxy(26,3);
cout<<"---------------";
gotoxy(26,5);
cout<<"1.Temporary";
gotoxy(26,6);
cout<<"2.Member";
gotoxy(26,10);
cin>>choice3;
switch(choice3)
case 1: clrscr();
if(!trec)
textcolor(LIGHTBLUE+BLINK);
gotoxy(2,2);
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
getch();
break;
else
gotoxy(24,12);
cin>>mrec;
if(mrec>trec)
clrscr();
textcolor(CYAN+BLINK);
gotoxy(2,2);
cout<<trec;
cout<<" Records Have Been Added.";
gotoxy(2,3);
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
cout<<endl;
getch();
break;
else
file1.open("temp.sav",ios::in|ios::out|ios::ate);
if(!file1)
break;
clrscr();
gotoxy(23,1);
cout<<mrec;
gotoxy(23,2);
cout<<"---------------------------------";
offset=((mrec-1)*sizeof(cyber));
file1.seekg(offset,ios::beg);
file1.read((char*)&cafe,sizeof(cyber));
show.dis();
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
getch();
textcolor(GREEN+BLINK);
file1.close();
break;
case 2: clrscr();
if(record==0)
textcolor(LIGHTBLUE+BLINK);
gotoxy(2,2);
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
getch();
break;
else
gotoxy(24,12);
cin>>mrec;
if(mrec>record)
{
clrscr();
textcolor(CYAN+BLINK);
gotoxy(2,2);
cout<<record;
gotoxy(2,3);
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
cout<<endl;
getch();
break;
else
file2.open("mem.sav",ios::in|ios::out|ios::ate);
if(!file2)
{
break;
clrscr();
gotoxy(23,1);
cout<<mrec;
gotoxy(23,2);
cout<<"---------------------------------";
offset=((mrec-1)*sizeof(cyber));
file2.seekg(offset,ios::beg);
file2.read((char*)&cafe,sizeof(cyber));
show.dis();
gotoxy(24,24);
file2.close();
textcolor(LIGHTGREEN+BLINK);
getch();
textcolor(BROWN);
break;
default:gotoxy(26,24);
textcolor(YELLOW);
cout<<"Wrong Choice!!!";
getch();
break;
break;
case 2: clrscr();
gotoxy(26,2);
cout<<"Customer Type:";
gotoxy(26,3);
cout<<"---------------";
gotoxy(26,5);
cout<<"1.Temporary";
gotoxy(26,6);
cout<<"2.Member";
gotoxy(26,10);
cin>>choice4;
switch(choice4)
case 1: if(!trec)
textcolor(LIGHTBLUE+BLINK);
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
getch();
break;
else
{
file1.open("temp.sav",ios::in|ios::out|ios::ate);
if(!file1)
break;
file1.close();
for(int i=0;i<trec;i++)
clrscr();
file1.open("temp.sav",ios::in|ios::out|ios::ate);
textcolor(MAGENTA);
gotoxy(28,2);
cout<<i+1;
cout<<" Follows:";
gotoxy(28,3);
cout<<" ------------------";
offset= i * sizeof(cyber);
file1.seekg(offset,ios::beg);
file1.read((char*)&cafe,sizeof(cyber));
show.dis();
gotoxy(24,24);
textcolor(LIGHTGREEN);
textcolor(RED);
getch();
file1.close();
break;
case 2: if(!record)
textcolor(LIGHTBLUE+BLINK);
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
cout<<" Press Any key to continue...";
getch();
break;
else
file2.open("mem.sav",ios::in|ios::out|ios::ate);
if(!file2)
break;
file2.close();
for(int i=0;i<record;i++)
clrscr();
file2.open("mem.sav",ios::in|ios::out|ios::ate);
textcolor(MAGENTA);
gotoxy(28,2);
cout<<" Record #";
cout<<i+1;
cout<<" Follows:";
gotoxy(28,3);
cout<<" ------------------";
offset=i*sizeof(cyber);
file2.seekg(offset,ios::beg);
file2.read((char*)&cafe,sizeof(cyber));
show.dis();
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
textcolor(YELLOW);
getch();
file2.close();
break;
}
getch();
break;
case 3: textcolor(MAGENTA);
file1.open("temp.sav",ios::in|ios::out|ios::ate);
if(!file1)
file1.seekg(0,ios::beg);
for(i=0;i<trec;i++)
offset=(i*sizeof(cyber));
file1.seekg(offset,ios::beg);
file1.read((char*)&cafe,sizeof(cyber));
psam+=(cafe.inf.noprn*md.printrate)+
(cafe.inf.noscan*md.scanrate);
temamt+=cafe.temp.calc(cafe.temp.h);
file1.close();
file2.open("temp.sav",ios::in|ios::out|ios::ate);
if(!file2)
cout<<" Fatal Error : File Stream is inaccesible ";
file2.seekg(0,ios::beg);
for(i=0;i<trec;i++)
offset=(i*sizeof(cyber));
file2.seekg(offset,ios::beg);
file2.read((char*)&cafe,sizeof(cyber));
psam+=(cafe.inf.noprn*md.printrate)+
(cafe.inf.noscan*md.scanrate);
memberamt+=cafe.mem.calcmem(cafe.mem.hr,cafe.mem.wrate
);
file2.close();
exp=md.mainbill+md.elecbill+md.ispbill;
totalps=temamt+psam+memberamt;
cafe.pro(totalps,exp);
show.caferate();
getch();
break;
default:textcolor(GREEN+BLINK);
getch();
textcolor(GREEN);
break;
break;
case 6: textcolor(BLUE);
if(!trec)
textcolor(BLUE+BLINK);
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
getch();
break;
}
else
anubhav:
clrscr();
gotoxy(26,2);
gotoxy(29,3);
cout<<"1.Name";
gotoxy(32,4);
cout<<"2.Phone...";
gotoxy(35,5);
cin>>sch;
if(sch!=1&&sch!=2)
goto anubhav ;
else
if(sch==1)
{
clrscr();
gets(sname);
result=cafe.search(sname);
clrscr();
cout<<"result is :";
cout<<result;
if(result==0)
gotoxy(10,23);
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
getch();
break;
else
{
textcolor(LIGHTGREEN+BLINK);
gotoxy(26,13);
puts(sname);
cout<<" Found!";
gotoxy(26,24);
textcolor(MAGENTA);
getch();
clrscr();
cout<<"-------------------";
offset=((result-1)*sizeof(cyber));
file1.seekg(offset,ios::beg);
file1.read((char*)&cafe,sizeof(cyber));
show.dis();
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
break;
else
if(sch==2)
cin>>sph;
result=cafe.search(sph);
cout<<"result is :";
cout<<result;
getch();
clrscr();
if(result==0)
textcolor(LIGHTMAGENTA+BLINK);
gotoxy(24,2);
textcolor(LIGHTGREEN+BLINK);
getch();
textcolor(GREEN);
break;
else
textcolor(LIGHTGREEN+BLINK);
gotoxy(26,13);
cout<<sph;
cout<<" Found!";
gotoxy(26,24);
textcolor(RED);
getch();
clrscr();
offset=((result-1)*sizeof(cyber));
file1.seekg(offset,ios::beg);
file1.read((char*)&cafe,sizeof(cyber));
show.dis();
getch();
textcolor(LIGHTRED);
break;
getch();
break;
case 7: textcolor(LIGHTGRAY);
cout<<"totalps";
cout<<totalps<<"
exp:"<<exp<<"memberamt:"<<memberamt;
cout<<endl<<"hrs :"<<cafe.temp.h/*<<"
tempamount:"<<cafe.tempamount*/<<endl<<" p:"<<cafe.p;
cout<<"pscamt:";
cout<<psam<<"total prints:"<<cafe.inf.noprn<<"total
scans:"<<cafe.inf.noscan<<endl<<"***These lines are for
testing purpose only!***";
getch();
break;
case 8: //textcolor(BLUE);
textcolor(YELLOW+BLINK);
exit(0);
MESSAGE";
getch();
int gd=DETECT,gm;
initgraph(&gd,&gm,"";
getpalette(&pal);
for(int i=0;i<25;i++)
setrgbpalette(pal.colors[i],i*5,i*8,i*3);
}
setcolor(7);
settextstyle(5,HORIZ_DIR,7);
textcolor(RED);
outtextxy(120,205,"working in this";
for(int p=36;p>=0;p--)
for(int i=50;i<650;i++)
for(int j=190;j<450;j++)
int x=getpixel(i,j);
if(x<p);
{
int t=getpixel(i,j+1);
if(t<x)
putpixel(i,j+1,getpixel(i,j)-1);
t=getpixel(i,j-1);
if(t<x)
putpixel(i,j-1,getpixel(i,j)-1);
t=getpixel(i+1,j);
if(t<x)
putpixel(i+1,j,getpixel(i,j)-1);
t=getpixel(i-1,j);
if(t<x)
putpixel(i-1,j,getpixel(i,j)-1);
exit(0);
closegraph();*/
break;
case 9 :textcolor(MAGENTA);
//exit();
break;
default :textcolor(BROWN+BLINK);
getch();
// break;
}while(choice>=1&&choice<=8);
gotoxy(24,24);
textcolor(LIGHTGREEN+BLINK);
textcolor(BLUE);
getch();
{
int n=0,e,pos1,g;
file1.open("temp.sav",ios::in|ios::out|ios::ate);
if(!file1)
file1.seekg(0,ios::end);
pos1=file1.tellg();
g=(pos1/sizeof(cyber));
// file1.seekg(0,ios::beg);
while(n<g)
e=(n*sizeof(cyber));
n++;
file1.seekg(e,ios::beg);
file1.read((char*)&cafe,sizeof(cyber));
if(inf.phone==tel)
file1.close();
return (n);
}
file1.close();
n=0;
e=0;
file2.open("mem.sav",ios::in|ios::out|ios::ate);
if(!file2)
file2.seekg(0,ios::end);
pos1=file2.tellg();
g=(pos1/sizeof(cyber));
while(n<g)
e=(n*sizeof(cyber));
file2.seekg(e,ios::beg);
file2.read((char*)&cafe,sizeof(cyber));
n++;
if(inf.phone==tel)
{
file2.close();
return n;
file2.close();
getch();
return 0;
int g,pos2;
file1.open("temp.sav",ios::in|ios::out|ios::ate);
if(!file1)
file1.seekg(0,ios::end);
pos2=file1.tellg();
g=(pos2/sizeof(cyber));
file1.seekg(0,ios::beg);
int ctr=0;
while(ctr<g)
file1.seekg(ctr*sizeof(cyber),ios::beg);
file1.read((char*)&cafe,sizeof(cyber));
ctr++;
if(strcmpi(cafe.inf.name,naam)==0)
file1.close();
return (ctr);
file1.close();
file2.open("mem.sav",ios::in|ios::out|ios::ate);
if(!file2)
file2.seekg(0,ios::end);
pos2=file1.tellg();
g=(pos2/sizeof(cyber));
file2.seekg(0,ios::beg);
ctr=0;
while(ctr<g)
file2.seekg(ctr*sizeof(cyber),ios::beg);
file2.read((char*)&cafe,sizeof(cyber));
ctr++;
if(strcmpi(cafe.inf.name,naam)==0)
file2.close();
return (ctr);
file2.close();
return 0;
}
DEBUGGING
Debugging is the process of isolating and correcting
the cause of known errors. The following steps were used
during debugging process :
1.Temporary
2.Member
○Enter choice...1
User Data Follows:
-----------------
Name : vinay
Address : PnP
Phone : 222222
Email : w2
Total Printouts: 0
Total Scanning: 0
Record Modified...
Weekly Rate : 35
Monthly Rate : 30
Yearly Rate : 25
○Enter choice...2
Display Menu
-------------
○ Enter Choice: 1
User Data Follows For Record #2
---------------------------------
Total printouts :0
Total Scanning :0
Result is: 2
Name : ashish
Address : PnP
Phone : 234444
Email : kumarashish
Total Printouts: 21
Total Scanning: 1
Improve security
Once installed, your computers will be safe and protected. Limit
access to windows desktop, drives, configure browser or run in
Hell for maximum protection.
Customer satisfaction
Fully customizable, tailored to customer needs. Offers stored
profiles and save games