Professional Documents
Culture Documents
future
Submitted to:
Mrs. Yojanabablani
Principal
Vijay laskhmi
Contents
Acknowledgement
Certificate
Introduction
1.1 Purpose
Source code
Outputs
Conclusion
References
Introduction
1.1 Purpose:
interaction with the various module s of the hotel and ease the
the hotel.
Code
#include<iostream.h>
#include<conio.h>
#include<string.h>
#include <time.h>
#include<graphics.h>
#include<process.h>
#include<fstream.h>
int trap=0;
char username[10];
char password[10];
};
void login();
voidcoupd();
void coup();
void gen();
void dlx();
voidspd();
void login()
clrscr() ;
gotoxy(30,12) ;
pass1=getch() ;
cout<<"*" ;
pass2=getch() ;
cout<<"*" ;
pass3=getch() ;
cout<<"*" ;
getch();
return;
clrscr();
gotoxy(30,12) ;
gotoxy(2,1) ;
getch() ;
exit(0) ;
class room
protected:
intr_no;
intr_charge;
charr_cust[20];
charc_city[20];
intc_mem;
charc_nat[20];
charr_avail;
intr_per;
int no;
char type[20];
int charge;
charcust[20];
char avail;
int per;
int year;
int mon;
int day;
public:
charr_type[20];
chargetavail()
return(r_avail);
void getr1()
r_no=1;
strcpy(r_type,"SpDlx");
r_charge=1500;
r_avail='Y';
strcpy(r_cust,"N.A");
r_per=0;
void getr2()
r_no=2;
strcpy(r_type,"Dlx");
r_charge=1000;
r_avail='Y';
strcpy(r_cust,"N.A");
r_per=0;
}
void getr3()
r_no=3;
strcpy(r_type,"Gen");
r_charge=750;
r_avail='Y';
strcpy(r_cust,"N.A");
r_per=0;
void getr4()
r_no=4;
strcpy(r_type,"Coupl");
r_charge=1250;
r_avail='Y';
strcpy(r_cust,"N.A");
r_per=0;
void getr5()
r_no=5;
strcpy(r_type,"CDlx");
r_charge=1500;
r_avail='Y';
strcpy(r_cust,"N.A");
r_per=0;
}
voidputinfo()
void modify()
cout<<"\n___________________________________________________________________
_________";
cin>>no;
cin>>type;
cin>>charge;
cin>>avail;
cin>>cust;
cout<<"\n For how many days cust want the room :";
cin>>per;
r_no=no;
strcpy(r_type,type);
r_charge=charge;
r_avail=avail;
strcpy(r_cust,cust);
r_per=per;
}
void allocate()
if(r_avail=='Y')
cin>>cust;
cout<<"\n For how many days cust want the room :";
cin>>per;
cin>>c_city;
cin>>c_nat;
cin>>c_mem;
cout<<"\n------------------------------";
cin>>year;
cin>>mon;
cin>>day;
strcpy(r_cust,cust);
r_per=per;
r_avail='N';
else
voidputcust()
inti,j;
i=day+r_per;
j=strcmp(r_cust,"N.A");
if(j==0)
else
date(i,mon,year);
};
void date(intd,intm,int y)
inti;
i=m%12;
if(i==0)
{
if(d>31)
d=d-31;
m=m+1;
if(m>12)
m=m-12;
y=y+1;
else
if(i==1)
if(d>31)
d=d-31;
m=m+1;
if(m>12)
m=m-12;
y=y+1;
else
if(i==2)
{
if(d>30)
d=d-30;
m=m+1;
if(m>12)
m=m-12;
y=y+1;
else
if(i==3)
if(d>31)
d=d-31;
m=m+1;
if(m>12)
m=m-12;
y=y+1;
else
if(i==4)
if(d>30)
d=d-30;
m=m+1;
if(m>12)
m=m-12;
y=y+1;
else
if(i==5)
if(d>31)
d=d-31;
m=m+1;
if(m>12)
m=m-12;
y=y+1;
}
else
if(i==6)
if(d>30)
d=d-30;
m=m+1;
if(m>12)
m=m-12;
y=y+1;
else
if(i==7)
if(d>31)
d=d-31;
m=m+1;
if(m>12)
m=m-12;
y=y+1;
}
else
if(i==8)
if(d>31)
d=d-31;
m=m+1;
if(m>12)
m=m-12;
y=y+1;
else
if(i==9)
if(d>30)
d=d-30;
m=m+1;
if(m>12)
m=m-12;
y=y+1;
else
if(i==10)
if(d>31)
d=d-31;
m=m+1;
if(m>12)
m=m-12;
y=y+1;
else
if(i==11)
if(d>30)
d=d-30;
m=m+1;
if(m>12)
m=m-12;
y=y+1;
}
cout<<"\n Departure Date :"<<d<<"/"<<m<<"/"<<y;
private:
long total;
int food;
long room;
floatser;
int t;
intoc;
public:
void calculate()
cin>>food;
cin>>oc;
ser=(int)(0.103*t);
total=t+ser;
voiddispbill()
clrscr();
cout<<"\n___________________________________________________________________
_____________";
cout<<"\n--------------------------------------------------------------------------------";
cout<<"\n ";
cout<<"\n ";
strcpy(r_cust,"N.A");
r_per=0;
r_avail='y';
day=0;
mon=0;
year=0;
strcpy(c_city,"N.A ");
strcpy(c_nat,"N.A ");
c_mem = 0;
void check();
};
if(r_avail=='y')
void main()
inti,ch;
login();
bill R[5];
char c;
clrscr();
getch();
clrscr();
R[0].getr1();
R[1].getr2();
R[2].getr3();
R[3].getr4();
R[4].getr5();
// textcolor(4+200);
// textbackground(3);
time_t t;
clrscr();
t = time(NULL);
cout<<"\n "<<ctime(&t);
t -= 24L*60L*60L;
cout<<"\n--------------------------------------------------------------------------------";
cout<<"\n--------------------------------------------------------------------------------";
cout<<"\n--------------------------------------------------------------------------------";
cout<<"\n--------------------------------------------------------------------------------";
gotoxy(35,35);
cout<<"Submitted By:";
gotoxy(35,37);
cout<<"Sunny Choudhary\n";
gotoxy(5,35);
cout<<"Guided By:-";
gotoxy(5,37);
cout<<"Mrs.YojanaBablani";
getch();
textcolor(10);
textbackground(4200);
xyz:
clrscr();
cout<<"\n--------------------------------------------------------------------------------";
cout<<"\n******************** Hotel Management System
**************************";
cout<<"\n--------------------------------------------------------------------------------";
cout<<"\n ";
cout<<"\n ";
cout<<"\n ";
cout<<"\n ";
cin>>ch;
if(ch>8)
clrscr();
getch();
goto xyz;
if(ch==1)
clrscr();
for(i=0;i<=4;i++)
{
R[i].putinfo();
getch();
clrscr();
cout<<"\n ";
cout<<"\n--------------------------------------------------------------------------------";
cin>>c;
if (c=='n')
goto xyz;
else
gotomno;
else
if(ch==2)
abc:
clrscr();
int n;
cin>>n;
if(n>5)
getch();
gotoabc;
n=n-1;
clrscr();
R[n].putcust();
getch();
clrscr();
cout<<"\n ";
cout<<"\n--------------------------------------------------------------------------------";
cin>>c;
if (c=='n')
goto xyz;
else
gotomno;
else
if(ch==3)
pqr:
clrscr();
int a;
cin>>a;
if(a>5)
{
getch();
gotopqr;
a=a-1;
R[a].modify();
getch();
clrscr();
cout<<"\n ";
cout<<"\n--------------------------------------------------------------------------------";
cin>>c;
if (c=='n')
goto xyz;
else
gotomno;
else
if(ch==4)
clrscr();
R[i].check();
getch();
clrscr();
cout<<"\n ";
cout<<"\n-----------------------------------------------------------------------------
---";
cin>>c;
if (c=='n')
goto xyz;
else
gotomno;
else
if(ch==5)
int b;
def:
clrscr();
cin>>b;
if(b>5)
gotodef;
b=b-1;
R[b].allocate();
getch();
clrscr();
cout<<"\n ";
cout<<"\n-----------------------------------------------------------------------------
---";
cin>>c;
if (c=='n')
goto xyz;
else
gotomno;
else
if(ch==6)
ghi:
clrscr();
inta,d,e,f,g,h;
char c;
char b[5];
cout<<"\n Enter Room No:";
cin>>a;
if(a>5)
getch();
gotoghi;
a=a-1;
strcpy(b,R[a].r_type);
d=stricmp(b,"SpDlx");
e=stricmp(b,"Dlx");
f=stricmp(b,"Gen");
g=stricmp(b,"Coupl");
h=stricmp(b,"CDlx");
if(d==0)
spd();
else
if(e==0)
dlx();
else
if(f==0)
gen();
else
if(g==0)
coupd();
else
if(h==0)
coup();
getch();
clrscr();
cout<<"\n ";
cout<<"\n-------------------------------------------------------------------
-------------";
cin>>c;
if (c=='n')
{
goto xyz;
else
if(ch==7)
stu:
clrscr();
int b;
cin>>b;
if(b>5)
getch();
gotostu;
charav;
av=R[b-1].getavail();
if(av=='y')
getch();
gotostu;
else
R[b-1].calculate();
R[b-1].dispbill();
getch();
clrscr();
cout<<"\n ";
cout<<"\n--------------------------------------------------------
------------------------";
cin>>c;
if (c=='n')
goto xyz;
else
if(ch==8)
gotomno;
mno:
voidspd()
clrscr();
cout<<"\n------------------------------------------------------------------";
cout<<"\n------------------------------------------------------------------";
cout<<"\n------------------------------------------------------------------";
cout<<"\n------------------------------------------------------------------";
cout<<"\n NOTE :- Extra bed will cost Rs.50 per bed ";
void dlx()
clrscr();
cout<<"\n-------------------------------------------------------------------";
cout<<"\n-------------------------------------------------------------------";
cout<<"\n-------------------------------------------------------------------";
cout<<"\n-------------------------------------------------------------------";
cout<<"\n NOTE :- Extra bed will cost Rs.50 per bed ";
}
void gen()
clrscr();
cout<<"\n------------------------------------------------------------------";
cout<<"\n------------------------------------------------------------------";
cout<<"\n------------------------------------------------------------------";
cout<<"\n------------------------------------------------------------------";
cout<<"\n NOTE :- Extra bed will cost Rs.50 per bed ";
void coup()
clrscr();
cout<<"\n------------------------------------------------------------------";
cout<<"\n------------------------------------------------------------------";
cout<<"\n ADDITIONAL FEATURES ";
cout<<"\n------------------------------------------------------------------";
cout<<"\n------------------------------------------------------------------";
cout<<"\n NOTE :- Extra bed will cost Rs.50 per bed ";
voidcoupd()
clrscr();
cout<<"\n------------------------------------------------------------------";
cout<<"\n------------------------------------------------------------------";
cout<<"\n------------------------------------------------------------------";
cout<<"\n------------------------------------------------------------------";
cout<<"\n NOTE :- Extra bed will cost Rs.50 per bed ";
Outputs
1.welome screen:
1.interface design :
3.room information:
4.customer info :
5.availability:
6.reserve room :
7.features of room:
8.create bill:
9. exit screen:
Conclusion
- At the end of this coursework, I was able to :
offrered facilities.
structures and organise them such that they will model real