Documente Academic
Documente Profesional
Documente Cultură
MANAGEMENT SYSTEM
12th
ARMY PUBLIC SCHOOL JANGLOT
Certificate
Acknowledgement
Introduction To C++
Important Features Of
C++
Hardware And Software
System Description At A
Glance
Data Base
Header Used And Their
Purpose
System Requirement
And Language Used
C++ Software
Program [Coding]
Output Of The Program
CERTIFICATE
THIS IS TO CERTIFY THAT
Satish chander
STUDENT OF CLASS XII OF ST. XAVIERS
CONVENT SCHOOL HAS SUCCESSFULLY
BEEN ABLE TO FINISH HIS PROJECT WORK
UNDER MY SUPERVISION.
Roll no.:
XII:
Class
Session:
board:
Candidate has done the project and signature
assigned in the project is genuine.
Teacher Incharge :
Principal :
Mr. DAISY SHARMA
HARDWARE AND
SOFTWARE
REQUIREMENTS OF
THE PROGRAM
HARDWARE REQUIREMENTS:
Processor(166MHZ or above)
VGA Monitor
Keyboard
32MB RAM
Hard disk
SOFTWARE REQUIREMENTS:
C++ Language
Window 98 or 95 or equivalent
MS_DOS Operating System
HOTEL DAT
Name
Occupants Name
R Code
Room number
Contact
Contact No
In date
Check In date
Out date
Room to be verified
C- rno
S.N
Function
Function Description
o
1
2
3
info()
Void customer::Show
customer
Function to show info about
5
6
info()
Void reservation ()
Void Status ()
customer
Function to reserve a room.
Function to show status of Room
Void Cancellation ()
Allotted
Function for cancellation of Room
Reserved.
functions
STDIO.H for standard I/O operations
DOS.H for execution of program
STRING.H for string handling
GRAPHICS.H for graphical display
IOMANIP.Hfor C++ streams I/O
manipulators
System
Requirements
1.
2.
3.
4.
Window Xp
Ram 512
Hard Disk 80 GB
CD Rom
Language Used
1. C++
#include<iostream.h>
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include<fstream.h>
struct customer
{private: char name[20];
char indate[10], outdate[10];
char contact[15];
int rcode;
public: void getinfo();
void showinfo();
int roomcode()
{
return rcode;
}
}c;
void customer::getinfo()
{
ofstream f;
f.open("cust.dat",ios::out|ios::app|ios::binary);
c.getinfo();
cout<<"\n\n\t You have entered the following Details.";
c.showinfo();
f.write((char*)&c,sizeof(c));
f.close();
}
void status()
{
clrscr();
ifstream f3;
int flag=0;
int vcode;
cout<<"\n\n\n\n\t\t\tEnter Room No. to be Verified:";
cin>> vcode;
f3.open("cust.dat",ios::in|ios::binary);
if(!f3)
{cout<<"\n\n\n\t\t\t DATABASE ERROR!!..Try After Some Time.. ";
getch();
exit(0);
}
while(f3.read((char*)&c, sizeof(c)))
{
if(c.roomcode()==vcode)
{
c.showinfo();
flag=1;
}
}
if(flag==0)
{
cout<<"\n\n\t\t\t Sorry! Reservation doesn't exist.";
getch();
}
f3.close();
}
clrscr();
char found='f',confirm='n';
ifstream f1("cust.dat",ios::in|ios::binary);
ofstream f2("t.dat",ios::out|ios::app|ios::binary);
while(f1.read((char*)&c,sizeof(c)))
{
if(c.roomcode()==vcode)
{
cout<<"\n\n\t\t\t\t Reservation Found.";
c.showinfo();
found='t';
cout<<"\n\n\t\t\tAre u sure to Cancel? (y/n)..";
cin>>confirm;
if ((confirm=='y'||confirm=='Y'))
{
cout<<"\n\n\n\t\t\t Reservation Cancelled.";
}
else
{
f2.write((char*)&c,sizeof(c));
cout<<"\n\n\t\t\tCancellation Aborted by user.";
}
}
else
{
f2.write((char*)&c,sizeof(c));
}
}
if(found=='f')
cout<<"\n\n\t Sorry! Reservation not found. Please check your Room No.
and Try again.";
getch();
f1.close();
f2.close();
remove("cust.dat");
rename("t.dat","cust.dat");
}
void main()
{
int ch;
char d;
clrscr();
cout<<"\n\n\n\n\n\n\n\n\n\n\t\t\t*************************************";
cout<<"\n\t\t\t*************************************";
cout<<"\n\n\t\t\t
cout<<"\n\n\t\t\t
";
";
Of
";
";
";
getch();
clrscr();
label:
cout<<"\n\n\n\n\n\t\t\t MAIN MENU"<<endl;
cout<<"\n\t\t\t***********";
cout<<"\n\n\n\t\t\t1.RESERVATION:";
cout<<"\n\n\n\t\t\t2.ROOM STATUS:";
cout<<"\n\n\n\t\t\t3.CANCELLATION:";
cout<<"\n\n\n\t\t\t4.QUIT:";
cout<<"\n\n\n\t\t\tENTER YOUR CHOICE:";
cin>>ch;
{
switch(ch)
{
case 1: clrscr();
do
{
clrscr();
reservation();
cout<<"\n\n\t\tWant to continue(y/n)?..";
cin>>d;
clrscr();
}while(d=='y'||d=='Y');
goto label;
case 2:
do
{
status();
cout<<"\n\n\t\tWant to continue(y/n)?..";
cin>>d;
clrscr();
}while(d=='y'||d=='Y');
goto label;
clrscr();
cout<<"\n\n\n\n\t\t\tEnter Room No. to be Cancelled:";
cin>> c_rno;
cancellation(c_rno);
cout<<"\n\n\t\tWant to continue(y/n)?..";
cin>>d;
clrscr();
}while(d=='y'||d=='Y');
goto label;
case 4: exit(0);
default:{cout<<"WRONG CHOICE..........TRY AGAIN";
goto label;
}}
}
}