Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 67

A

MAJOR PROJECT REPORT


On
“HOTEL MANAGEMENT SYSTEM”

Submitted to the particular fulfillment the requirement for the


award the degree of

Bacholer of Computer Application

SUBMITTED BY: SUBMITTED TO:


VAISHNAVI MS.DEEPA GARG
ROLL NO.-190349106086 (ASSISTANT PROFESSIOR)
BCA III-YEAR (VICT)
MEGHA RANA
ROLL NO.-190349106051
BCA III-YEAR

VIDYA INSTITUTE OF CREATIVE TEACHING


BAGHPAT ROAD, MEERUT
Acknowledgment

On the eve of the completion of the project “HOTEL


MANAGEMENT SYSTEM”, It is with deep sense of gratitude that I
express my utmost and heartiest thanks to MS.DEEPA GARG
(Project Guide) , under whose guidance and supervision I had the
opportunity of carrying out the project work. I extend my thanks
for his valuable suggestions throughout the preparation of this
project work. In spite of his busy schedules, he always made
himself available to me in every possible way he could.

Finally I owe my special gratitude to my parents and


family members for their help and encouragement. This project is
now complete because of the affection and support of all the
benefactors. as they say, last but not the least I would also say
thanks to my all friends who have helped me by providing me with
all those information and helped me in endeavour.

Concluding, I thank each and every person who helped


me directly or indirectly in this project…

VAISHN
AVI (BCA 3 RD
YEAR)
SROLL NO. 190349106086

MEGHA RANA
(BCA 3RD YEAR)
ROLL NO. 190349106051
ABSTRACT

Abstraction is a very powerful concept that is used in all-engineering disciplines. It is a tool

that permits a designer to consider a component at an abstract level without worrying about

the details of the implementation of the component. Any component or system provides

some services to its environment. An abstraction of a component describes the external

behavior of that component without bothering with the internal details that produce the

behavior. Presumably, the abstract definition of a component is much simpler than the

component itself.

In functional abstraction, a module is specified by the function it performs. For example, a

module to compute the log of a value can be abstractly represented by the function log.

Similarly, a module to sort an input array can be represented by the specification of sorting.

Functional abstraction is the basis of partitioning in function- oriented approaches. That is,

when the problem is being partitioned, the overall transformation function for the system is

partitioned into smaller functions that comprise the system function. The decomposition of

this is terms of functional modules.

The second unit for abstraction is data abstraction. Data abstraction forms the basis for
object-oriented design. In using this abstraction, a system is viewed as a set of objects
providing some services. Hence, the decomposition of the system is done with respect to the
objects the system contains.
Index

 ACKNOWLEDGEMENT
 CERTIFICATE
 ROLES AND RESPONSIBILITY
 ABSTRACT
 INDEX
 OBJECTIVES AND SCOPOE OF THE PROJECT
 HARDWARE & SOFTWARE REQUIREMENT
 CODING
 OUTPUT
 DATA FLOW DIAGRAM
 ER DIAGARAM
 SYSTEM DEVELOPMENT LIFE CYCLE
 BIBLIOGRAPHY
OBJECTIVES AND SCOPE OF THE PROJECT

The main objective of this project “Hotel Management System” is to facilitate the
records of Hotel in handling various records related to the customer’s personnel
information and various types of fee transactions. Transformation from manual entry
system to a computerized entry system also achieves the objectives of:

1. Reduced time consumption in generating various types of receipts.


2. Easy insertion, modification and display of all the records.
3. Requirement of less space for storing all the data records.
4. Fast access to any particular customer’s record.
5. Easy transactions of all the types of fee.
6. Reduced Operating cost of the system.

This project is made for the Reservation of Hotel handling all the information related
to the various types of fee deposited by the customer but its scope, if required, can be
generalized to include all the data related to all the sections of the hotel.
DETAILS OF HARDWARE & SOFTWARE USED

OPERATING SYSTEM: WINDOWS-98

COMPILER: turbo C/C++ IDE


Version 3.0 Copyright (c) 1990, 1992 by
Borland International Inc.

COMPILER OPTION

CODE GENERATION MODEL: MALL

INSTRUCTION SET : 8086

LINKER –LIBRARY : Standered Run Time and


Graphics Library

HARDWARE

PROCESSOR INTEL P-IV


RAM 256 MB
HRAD DISK 40 GB
FLOPPY DISK DRIVE 3.5”
//PROJECT ON HOTEL MANAGEMENT
#include<iostream.h>
#include<conio.h>
#include<dos.h>
#include<iomanip.h>
#include<graphics.h>
#include<stdio.h>
#include<string.h>
#include<fstream.h>
#include<stdlib.h>
#include<ctype.h>
#include<process.h>

fstream f,f1,f2,f3,f4,f5,f6,f7,f8;

//**********************************************************
// CLASS NAME : Hotel
// DETAILS : IT CONTROLS OVER ALL FUNCTIONING
// OF THE HOTEL
//**********************************************************
class HOTEL
{
char array[100];
struct bill_restaurant_bar
{
long brestaurant,bbar;
} b[100];
struct booking_data
{
long charge,roomno;
char name[25],address[75],telno[10],date[11],roomtype[15];
} d;
struct check_out_data
{
char name[25],address[75],telno[10],date[11],odate[11],otime[6];
int roomno;
} C;
struct cancellation_data
{
char name[25],address[75],telno[10];
} D;
struct member_swimming_pool_data
{
char name[25],address[75],telno[10],date[11];
int memno;
} ms;
struct member_gym_data
{
char name[25],address[75],telno[10],date[11];
int memno;
} mg;
public:
void booking();
void check_in();
void check_out();
void cancellation();
void taxi_service();
void restaurant();
void bar();
void swimming_pool();
void gymnasium();
void games();
void view_data();
} H;

//**********************************************************
// FUNCTION NAME : BOOKING
//**********************************************************

void HOTEL::booking ()
{
textcolor(2);
clrscr();
int c=0;
//FINDING AN UNOCCUPIED ROOM
f.open("ARRAY.DAT",ios::in|ios::binary);
f.read((char *)&array,sizeof(array));
while(array[c]!='e') c++;
array[c]='o';
f.close();
f.open("ARRAY.DAT",ios::out|ios::binary);
f.write((char *)&array,sizeof(array));
f.close();
f1.open("HOT.EL",ios::app|ios::binary);
d.roomno=c+1;
//DATA OF THE CUSTOMER
cout<<"ENTER THE REQUIRED DATA\n"
<<"NAME :: ";
gets(d.name);
int l=strlen(d.name);
for(int i=0;i<l;i++) d.name[i]=toupper(d.name[i]);
cout<<"ADDRESS(R) :: ";
gets(d.address);
cout<<"TEL. NO.(R) :: ";
gets(d.telno);
cout<<"DATE WHEN YOU WILL CHECK-IN(dd/mm/yyyy) :: ";
gets(d.date);
cout<<"\n\nROOM TYPES "<<"\t"
<<"CODES"<<"\t"<<"CHARGE PER DAY\n"
<<"ROYAL SUITE "<<"\t"<<"1. "<<"\t"<<"Rs 20,000\n"
<<"SUPER DELUXE"<<"\t"<<"2. "<<"\t"<<"Rs 15,000\n"
<<"DELUXE "<<"\t"<<"3. "<<"\t"<<"Rs 10,000\n"
<<"DOUBLE BED "<<"\t"<<"4. "<<"\t"<<"Rs 5,000\n"
<<"SINGLE BED "<<"\t"<<"5. "<<"\t"<<"Rs 2,000\n";
int roomcode;
REDO:
cout<<"ROOM CODE :: ";
cin>>roomcode;
switch(roomcode)
{
case 1 : strcpy(d.roomtype,"ROYAL SUITE");
d.charge=20000;
break;
case 2 : strcpy(d.roomtype,"SUPER DELUXE");
d.charge=15000;
break;
case 3 : strcpy(d.roomtype,"DELUXE");
d.charge=10000;
break;
case 4 : strcpy(d.roomtype,"DOUBLE BED");
d.charge=5000;
break;
case 5 : strcpy(d.roomtype,"SINGLE BED");
d.charge=2000;
break;
default: cout<<"ENTER THE RIGHT CODE\n";
goto REDO;
}
clrscr();
cout<<"YOUR ROOM NO. IS :: "<<d.roomno<<"\n";
gotoxy(25,25);
cout<<"PRESS ANY KEY TO CONTINUE";
getch();
//COPYING THE RECORD OF THE CUSTOMER INTO A FILE
f1.write((char *)&d,sizeof(d));
f1.close();
clrscr();
}
void HOTEL::check_in()
{
textcolor(12);
clrscr();
int rn;
char ans;
cout<<"HAVE YOU BOOKED IN ADVANCE ?(Y/N)::";
cin>>ans;
if(ans=='n'||ans=='N')
{
cout<<"THEN YOU FIRST HAVE TO BOOK";
gotoxy(25,25);
cout<<"PRESS ANY KEY TO CONTINUE";
getch();
booking();
}
clrscr();
cout<<"ROOM NUMBER :: ";
cin>>rn;
f1.open("HOT.EL",ios::in|ios::binary);
do f1.read((char *)&d,sizeof(d)); while(d.roomno!=rn);
cout<<"NAME :: "<<d.name<<"\n"
<<"ADDRESS(R) :: "<<d.address<<"\n"
<<"TEL. NO.(R) :: "<<d.telno<<"\n"
<<"CHECK-IN DATE :: "<<d.date<<"\n"
<<"ROOM TYPE :: "<<d.roomtype;
gotoxy(25,25);
cout<<"PRESS ANY KEY TO CONTINUE";
getch();
f1.close();
clrscr();
}
void HOTEL::check_out()
{
textcolor(10);
clrscr();
int rn;
cout<<"ROOM NUMBER :: ";
cin>>rn;
char od[11],ot[6];
cout<<"CHECK-OUT DATE (dd/mm/yyyy) :: ";
gets(od);
cout<<"CHECK-OUT TIME (in form of 07:30 , 22:55 etc) :: ";
gets(ot);
textcolor(6);
clrscr();
fstream e;
f1.open("HOT.EL",ios::in|ios::binary);
do{ f1.read((char *)&d,sizeof(d)); }while(d.roomno!=rn);
gotoxy(25,1); cout<<"**** BILL ****\n\n";
cout<<endl;
cout<<"\t\tROOM NUMBER :: "<<d.roomno<<"\n"
<<"\t\tNAME :: "<<d.name<<"\n"
<<"\t\tADDRESS(R) :: "<<d.address<<"\n"
<<"\t\tTEL. NO.(R) :: "<<d.telno<<"\n"
<<"\t\tROOM TYPE :: "<<d.roomtype<<"\n"
<<"\t\tCHECK-IN DATE :: "<<d.date<<"\n"
<<"\t\tCHECK-OUT DATE :: "<<od<<"\n"
<<"\t\tCHECK-OUT TIME :: "<<ot<<"\n";
//COPYING THE RECORD OF THE CUSTOMER INTO ANOTHER FILE
f2.open("C.OUT",ios::app|ios::binary);
strcpy(C.name,d.name);
strcpy(C.address,d.address);
strcpy(C.telno,d.telno);
strcpy(C.date,d.date);
strcpy(C.odate,od);
strcpy(C.otime,ot);
C.roomno=d.roomno;
f2.write((char *)&C,sizeof(C));
f2.close();
//CALCULATING NO. OF DAYS THE CUSTOMER OCCUPIED THE ROOM
//AND PRINTING THE TARIFF
long tariff;
int dd1,dd2,mm1,mm2,yy1,yy2,p,q,r;
dd1=(d.date[0]-48)*10+(d.date[1]-48);
dd2=(od[0]-48)*10+(od[1]-48);
mm1=(d.date[3]-48)*10+(d.date[4]-48);
mm2=(od[3]-48)*10+(od[4]-48);
yy1=(d.date[6]-48)*1000+(d.date[7]-48)*100+(d.date[8]-48)*10+(d.date[9]-48);
yy2=(od[6]-48)*1000+(od[7]-48)*100+(od[8]-48)*10+(od[9]-48);
if(yy1%4==0) { p=29; q=28; }
else if(yy2%4==0) { p=28; q=29; }
else { p=28; q=28; }
int cy[12]={ 31,p,31,30,31,30,31,31,30,31,30,31 };
int ny[12]={ 31,q,31,30,31,30,31,31,30,31,30,31 };
if(yy1==yy2 && mm1==mm2 && dd1==dd2) tariff=d.charge;
else
{
if(yy1==yy2)
{
if(mm1==mm2) tariff=d.charge*(dd2-dd1);
else
{
r=cy[mm1-1]-dd1+dd2;
for(int l=mm1;l<mm2-1;l++) r+=cy[l];
tariff=d.charge*r;
}
}
else
{
r=cy[mm1-1]-dd1+dd2;
for(int l=mm1;l<12;l++) r+=cy[l];
for(l=0;l<mm2-1;l++) r+=ny[l];
tariff=d.charge*r;
}
}
int c1,c2;
c1=(ot[0]-48)*10+(ot[1]-48);
c2=(ot[3]-48)*10+(ot[4]-48);
if(yy1==yy2 && mm1==mm2 && dd1==dd2);
else if(c1>12) tariff+=d.charge;
else if(c1==12 && c2>0) tariff+=d.charge;
cout<<"\t\tTARIFF :: Rs "<<tariff<<'\n';
f1.close();
//SHOWING THE CUSTOMER'S RESTAURANT AND BAR BILL
f8.open("BILL.DAT",ios::in|ios::binary);
f8.read((char *)&b,sizeof(b));
cout<<"\t\tRESTAURANT CHARGE :: Rs "<<b[rn-1].brestaurant<<'\n'
<<"\t\tBAR CHARGE :: Rs "<<b[rn-1].bbar<<'\n'
<<"\t\tTOTAL :: Rs "<<b[rn-1].brestaurant+b[rn-1].bbar+tariff;
b[rn-1].bbar=b[rn-1].brestaurant=0;
f8.close();
f8.open("BILL.DAT",ios::out|ios::binary);
f8.write((char *)&b,sizeof(b));
f8.close();
//DELETING THE RECORD OF THE CUSTOMER
f1.open("HOT.EL",ios::in|ios::binary);
e.open("F.DAT",ios::out|ios::binary);
f1.read((char *)&d,sizeof(d));
while(f1)
{
if(d.roomno!=rn)
{
e.write((char *)&d,sizeof(d));
f1.read((char *)&d,sizeof(d));
}
else f1.read((char *)&d,sizeof(d));
}
e.close();
f1.close();
f1.open("HOT.EL",ios::out|ios::binary);
e.open("F.DAT",ios::in|ios::binary);
e.read((char *)&d,sizeof(d));
while(e)
{
f1.write((char *)&d,sizeof(d));
e.read((char *)&d,sizeof(d));
}
e.close();
f1.close();
//MAKING THE ROOM OCCUPIED BY THE CUSTOMER AS UNOCCUPIED
f.open("ARRAY.DAT",ios::in|ios::binary);
f.read((char *)&array,sizeof(array));
array[rn-1]='e';
f.close();
f.open("ARRAY.DAT",ios::out|ios::binary);
f.write((char *)&array,sizeof(array));
f.close();
gotoxy(25,25);
cout<<"PRESS ANY KEY TO CONTINUE";
getch();
clrscr();
}
void HOTEL::cancellation()
{
textcolor(1);
clrscr();
int rn;
cout<<"ROOM NUMBER :: ";
cin>>rn;
f1.open("HOT.EL",ios::in|ios::binary);
do f1.read((char*)&d,sizeof(d)); while(d.roomno!=rn);
cout<<"NAME :: "<<d.name<<"\n"
<<"ADDRESS(R) :: "<<d.address<<"\n"
<<"TEL. NO.(R) :: "<<d.telno<<"\n"
<<"ROOM TYPE :: "<<d.roomtype<<"\n"
<<"CANCELLED\n";
//COPYING THE RECORD OF THE CUSTOMER INTO ANOTHER FILE
f3.open("CAN.CEL",ios::app|ios::binary);
strcpy(D.name,d.name);
strcpy(D.address,d.address);
strcpy(D.telno,d.telno);
f3.write((char *)&D,sizeof(D));
f3.close();
f1.close();
//MAKING THE ROOM ALLOTED TO THE CUSTOMER AS EMPTY
f.open("ARRAY.DAT",ios::in|ios::binary);
f.read((char *)&array,sizeof(array));
array[rn-1]='e';
f.close();
f.open("ARRAY.DAT",ios::out|ios::binary);
f.write((char *)&array,sizeof(array));
f.close();
fstream e;
//DELETING THE RECORD OF THE CUSTOMER
f1.open("HOT.EL",ios::in|ios::binary);
e.open("F1.DAT",ios::out|ios::binary);
f1.read((char *)&d,sizeof(d));
while(f1)
{
if(d.roomno!=rn)
{
e.write((char *)&d,sizeof(d));
f1.read((char *)&d,sizeof(d));
}
else f1.read((char *)&d,sizeof(d));
}
e.close();
f1.close();
f1.open("HOT.EL",ios::out|ios::binary);
e.open("F1.DAT",ios::in|ios::binary);
e.read((char *)&d,sizeof(d));
while(e)
{
f1.write((char *)&d,sizeof(d));
e.read((char *)&d,sizeof(d));
}
e.close();
f1.close();
gotoxy(25,25);
cout<<"PRESS ANY KEY TO CONTINUE";
getch();
clrscr();
}
void HOTEL::taxi_service()
{
int gd=DETECT,gm,choice;
initgraph(&gd,&gm,"c:\\tc\\bgi");
settextstyle(10,0,1);
int x=40,y=10;
setcolor(BROWN);
outtextxy(50,20,"I am staying in this hotel");
outtextxy(x,y,".");
setcolor(CYAN);
outtextxy(50,60,"I am not staying in this hotel");
char W;
int count=0;
do
{
count++;
W=getch();
if(W=='\0'+'H')
{
setcolor(BLACK);
outtextxy(x,y,".");
y-=40;
if(y<10)
{
y=50;
setcolor(CYAN);
outtextxy(x,y,".");
choice=2;
}
else if(y==10)
{
setcolor(BROWN);
outtextxy(x,y,".");
choice=1;
}
else if(y==50)
{
setcolor(CYAN);
outtextxy(x,y,".");
choice=2;
}
}
else if(W=='\0'+'P')
{
setcolor(BLACK);
outtextxy(x,y,".");
y+=40;
if(y>50)
{
y=10;
setcolor(BROWN);
outtextxy(x,y,".");
choice=1;
}
else if(y==10)
{
setcolor(BROWN);
outtextxy(x,y,".");
choice=1;
}
else if(y==50)
{
setcolor(CYAN);
outtextxy(x,y,".");
choice=2;
}
}
else if(count==1 && W==13) choice=1;
} while(W!=13);
closegraph();
textcolor(8);
clrscr();
if(choice==1)
{
char n[25],t[6],date[11];
int x,room;
cout<<"ROOM NUMBER :: ";
cin>>room;
cout<<"NAME :: ";
gets(n);
int l=strlen(n);
for(int i=0;i<l;i++) n[i]=toupper(n[i]);
//VERIFYING THE ENTERED DATA
f1.open("HOT.EL",ios::in|ios::binary);
f1.read((char *)&d,sizeof(d));
while(f1)
{
if(d.roomno==room && strcmp(d.name,n)==0)
{
f1.close();
goto PROCEED;
}
f1.read((char *)&d,sizeof(d));
}
f1.close();
clrscr();
cout<<"SORRY.ENTERED DATA IS NOT MATCHING THE ACTUAL DATA"
<<"\nYOU CAN NOT USE THIS FACILITY";
gotoxy(25,25);
cout<<"PRESS ANY KEY TO CONTINUE";
getch();
return;
PROCEED:
cout<<"NO. OF TAXIS NEEDED :: ";
cin>>x;
cout<<"TAXI(s) NEEDED ON (date) :: ";
gets(date);
cout<<"TAXI(s) NEEDED AT (time) :: ";
gets(t);
clrscr();
if(x==1)
cout<<"A TAXI WILL BE WAITING FOR YOU AT "<<t
<<" ON "<<date<<" OUTSIDE THE HOTEL GATE";
else
cout<<x<<" TAXIS WILL BE WAITING FOR YOU AT "<<t
<<" ON "<<date<<" OUTSIDE THE HOTEL GATE";
gotoxy(25,25);
cout<<"PRESS ANY KEY TO CONTINUE";
getch();
}
clrscr();
}
void HOTEL::restaurant()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
cleardevice();
setbkcolor(RED);
settextstyle(8,0,4);
setcolor(YELLOW);
delay(1000);
outtextxy(50,150,"WELCOME TO THE RESTAURANT");
delay(2000);
outtextxy(100,200,"PLEASE TAKE YOUR SEAT");
delay(2000);
closegraph();
int price[113]={245,245,245,245,240,240,240,240,235,235,250,235,235,
220,215,230,215,240,250,250,250,250,250,250,250,255,245,245,245,245,
250,240,240,360,290,360,290,370,295,360,290,360,290,250,360,290,360,
290,250,370,290,360,290,250,250,280,245,290,235,265,240,290,300,256,
240,265,270,255,255,240,240,235,220,25,30,25,30,35,35,25,30,35,25,35,
25,25,30,100,105,105,100,105,100,105,125,105,105,100,105,110,115,100,
100,100,105,105,105,105,125,105,120,120,100};
char food[113][30]={"SHAHI PANEER","KADAI PANEER","CHEESE
KORMA",
"MALAI KOFTA","MATAR PANEER","PALAK PANEER","MIX
VEG.","ALOO GOBI",
"ALOO JEERA","CHANA MASALA","MATAR MUSHROOM","RAJMA
MAKHANI",
"DAL MAKHANI","MIXED RAITA","BUNDI RAITA","PINEAPPLE RAITA",
"SALAD(GREEN)","DUM ALOO","MUSHROOM PANEER","MUTTON
MASALA",
"MUTTON MUGHLAI","MUTTON KORMA","MUTTON DO
PYAZA","MUTTON SAGH",
"MUTTON DAHI","MUTTON ROGAN JOSH","MUTTON CURRY","KADAI
MUTTON",
"KEEMA LEVER","KEEMA MATAR","KEEMA EGG","BRAIN CURRY","EGG
CURRY",
"BUTTER CHICKEN","BUTTER CHICKEN(1/2)","KADAI CHICKEN",
"KADAI CHICKEN(1/2)","BUTTER CHICKEN(BL)","BUTTER CHICKEN(BL)
(1/2)",
"CHICKEN MUGHLAI","CHICKEN MUGHLAI(1/2)","CHICKEN MASALA",
"CHICKEN MASALA(1/2)","CHICKEN MASALA(1/4)","CHICKEN SAGH",
"CHICKEN SAGH(1/2)","CHICKEN DAHI","CHICKEN DAHI(1/2)",
"CHICKEN DAHI(1/4)","CHICKEN KORMA","CHICKEN KORMA(1/2)",
"CHICKEN DO PYAZA","CHICKEN DO PYAZA(1/2)","FISH CURRY",
"CHICKEN CURRY","CHICKEN CURRY(1/2)","CHICKEN CURRY(1/4)",
"CHILLI CHICKEN","TANDOORI ALOO","CHICKEN TIKKA","SEEKH
KABAB",
"FISH TIKKA","CHICKEN TANDOORI","CHICKEN TANDOORI(1/2)",
"PANEER TIKKA","CHICKEN SEEKH KABAB","CHICKEN HARA KABAB",
"CHICKEN BIRYANI","MUTTON BIRYANI","PANEER
PULAO","VEG.PULAO",
"JEERA RICE","STEAMED RICE","RUMALI ROTI","ROTI","NAN","ALOO
NAN",
"PANEER NAN","KEEMA NAN","PARANTHA","ALOO PARANTHA",
"PANEER PARANTHA","PUDINA PARANTHA","BUTTER NAN","LACHCHA
PARANTHA",
"MISSI ROTI","KHASTA ROTI","VEG.BURGER","PANEER BURGER",
"CHEESE SANDWICH","VEG.PATTI","CHICKEN PATTI","TEA","COFFEE",
"COLD COFFEE","PINEAPPLE","STRAWBERRY","CHOCOLATE","BLACK
FOREST",
"DOUBLE STORIED","TRIPLE STORIED","SOFT
CONE","VANILLA","STRAWBERRY",
"CHOCOLATE","CHOCO CHIPS","MANGO","TUTTI FRUITY","LICHI",
"PISTA BADAM","CHOCOLATE PISTA BADAM","CHOCO
DIP","CHOCOLATE LICHI"};
START:
textcolor(4);
clrscr();
gotoxy(31,1); cout<<"*********";
gotoxy(31,2); cout<<"MENU CARD";
gotoxy(31,3); cout<<"*********";
gotoxy(31,5); cout<<"VEGETARIAN";
for(int i=0;i<15;i++)
{
gotoxy(15,i+7); cout<<i+1;
gotoxy(30,i+7); cout<<food[i];
gotoxy(55,i+7); cout<<price[i];
}
gotoxy(25,25); cout<<"PRESS ANY KEY TO CONTINUE"; getch();
clrscr();
for(i=15;i<19;i++)
{
gotoxy(15,i-14); cout<<i+1;
gotoxy(30,i-14); cout<<food[i];
gotoxy(55,i-14); cout<<price[i];
}
gotoxy(33,7); cout<<"MUTTON";
for(i=19;i<33;i++)
{
gotoxy(15,i-10); cout<<i+1;
gotoxy(30,i-10); cout<<food[i];
gotoxy(55,i-10); cout<<price[i];
}
gotoxy(25,25) ;cout<<"PRESS ANY KEY TO CONTINUE"; getch();
clrscr();
gotoxy(31,1); cout<<"CHICKEN";
for(i=33;i<54;i++)
{
gotoxy(15,i-30); cout<<i+1;
gotoxy(25,i-30); cout<<food[i];
gotoxy(55,i-30); cout<<price[i];
}
gotoxy(25,25) ;cout<<"PRESS ANY KEY TO CONTINUE"; getch();
clrscr();
for(i=54;i<58;i++)
{
gotoxy(15,i-53); cout<<i+1;
gotoxy(30,i-53); cout<<food[i];
gotoxy(55,i-53); cout<<price[i];
}
gotoxy(31,7); cout<<"BAR-BE-QUE";
for(i=58;i<73;i++)
{
gotoxy(15,i-49); cout<<i+1;
gotoxy(30,i-49); cout<<food[i];
gotoxy(55,i-49); cout<<price[i];
}
gotoxy(25,25); cout<<"PRESS ANY KEY TO CONTINUE"; getch();
clrscr();
gotoxy(30,1); cout<<"ROTI-NAN-PARANTHA";
for(i=73;i<92;i++)
{
gotoxy(15,i-70); cout<<i+1;
gotoxy(30,i-70); cout<<food[i];
gotoxy(55,i-70); cout<<price[i];
}
gotoxy(25,25); cout<<"PRESS ANY KEY TO CONTINUE"; getch();
clrscr();
gotoxy(30,1); cout<<"BEVERAGES";
for(i=92;i<95;i++)
{
gotoxy(15,i-89); cout<<i+1;
gotoxy(30,i-89); cout<<food[i];
gotoxy(55,i-89); cout<<price[i];
}
gotoxy(30,8) ;cout<<"PASTRIES";
for(i=95;i<101;i++)
{
gotoxy(15,i-85); cout<<i+1;
gotoxy(30,i-85); cout<<food[i];
gotoxy(55,i-85); cout<<price[i];
}
gotoxy(25,25); cout<<"PRESS ANY KEY TO CONTINUE"; getch();
clrscr();
gotoxy(30,1); cout<<"ICE-CREAMS";
for(i=101;i<113;i++)
{
gotoxy(15,i-98); cout<<i+1;
gotoxy(30,i-98); cout<<food[i];
gotoxy(55,i-98); cout<<price[i];
}
gotoxy(25,25);cout<<"PRESS ANY KEY TO CONTINUE"; getch();
clrscr();
int answ,fc,fch[113],fe=0,z=-1;
char fi[113][30],answe;
RETRY:
clrscr();
cout<<"PRESS 0 TO GO BACK TO MENU CARD\n"
<<"PRESS 1 TO CONTINUE ";
cin>>answ;
switch(answ)
{
case 0 : goto START;
// break;
case 1 : clrscr();
do
{
z++;
cout<<"ENTER THE FOOD CODE YOU WANT TO HAVE :: ";
cin>>fc;
fch[z]=price[fc-1];
fe+=price[fc-1];
strcpy(fi[z],food[fc-1]);
cout<<"DO YOU WANT MORE(Y/N) :: ";
cin>>answe;
} while(answe=='y' || answe=='Y');
clrscr();
for(int y=0;y<z+1;y++)
{
cout<<fi[y];
gotoxy(40,y+1); cout<<fch[y]<<"\n";
}
cout<<"TOTAL";
gotoxy(40,y+1); cout<<fe<<"\n";
cout<<"ARE YOU STAYING IN THIS HOTEL (Y/N) ? ";
char ans;
cin>>ans;
if(ans=='y' || ans=='Y')
{
char na[25];
int rn;
cout<<"ROOM NO. :: ";
cin>>rn;
cout<<"NAME :: ";
gets(na);
for(i=0;na[i]!='\0';i++) na[i]=toupper(na[i]);
//VERIFYING THE ENTERED DATA
f1.open("HOT.EL",ios::in|ios::binary);
f1.read((char *)&d,sizeof(d));
while(f1)
{
if(d.roomno==rn && strcmp(d.name,na)==0)
{
f1.close();
goto BILL;
}
f1.read((char *)&d,sizeof(d));
}
f1.close();
cout<<"ENTERED DATA IS NOT MATCHING THE ACTUAL
DATA";
gotoxy(25,25); cout<<"PRESS ANY KEY AFTER PAYING THE BILL
";
getch();
return;
BILL:
//ENTERING THE RESTAURANT CHARGE INTO THE FILE
f8.open("BILL.DAT",ios::in|ios::binary);
f8.read((char *)&b,sizeof(b));
int first=0;
cout<<" \nVisiting first ";
cout<<" \nPress 1 if Yes ";
cout<<" \nPress 0 if No";
cin>>first;
if (first == 1)
{
b[rn-1].brestaurant = 0;
b[rn-1].brestaurant+=fe;
}
else
b[rn-1].brestaurant+=fe;

f8.close();
f8.open("BILL.DAT",ios::out|ios::binary);
f8.write((char *)&b,sizeof(b));
f8.close();
cout<<"THE RESTAURANT BILL HAS BEEN ENTERED INTO
YOUR RECORD";
}
else
{
gotoxy(25,25);
cout<<"PRESS ANY KEY AFTER PAYING THE BILL ";
getch();
return;
}
gotoxy(25,25);
cout<<"PRESS ANY KEY TO CONTINUE";
getch();
break;
default: cout<<"YOU HAVE PRESSED A WRONG KEY\nRETRY\n";
getch();
goto RETRY;
}
clrscr();
}
void HOTEL::bar()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
cleardevice();
setbkcolor(RED);
settextstyle(8,0,4);
setcolor(YELLOW);
delay(1000);
outtextxy(120,150,"WELCOME TO THE BAR");
delay(2000);
outtextxy(150,200,"PLEASE BE SEATED");
delay(2000);
closegraph();
char bottle[32][20]={"RED LABEL","BLACK LABEL","GOLD LABEL",
"SIGNATURE","SEAGRAMS","8 PM","CHIVAS REGAL","MC
DOWELL","BLACK DOG",
"BAGPIPER","PETER SCOT","JOHNY
WALKER","KINGFISHER","FOSTERS",
"BUD WEISER","HAYWARD 2000","HAYWARD 5000","VORIAN 6000","RED
WINE",
"WHITE WINE","PORT WINE","IRISH CREAM","OLD MONK","BACARDI",
"BLUE RIBAND","SMIRNOFF","VO DE FRANCE","LEMAR DE VONCON",
"VINTAGE BUBBLY","KINGFISHER","BAGPIPER","EVIAN BRAND"};
int cost[32]={1500,4000,6000,3000,2500,2000,5000,1500,4000,1500,
2000,6000,1000,1500,1000,1000,1500,1500,500,550,600,4000,1500,1000,
1000,1500,5000,5500,8000,150,150,80};
START:
textcolor(4);
clrscr();
gotoxy(18,1); cout<<"CODE";
gotoxy(35,1); cout<<"BRAND";
gotoxy(59,1); cout<<"PRICE";
gotoxy(35,4); cout<<"WHISKY";
for(int i=0;i<12;i++)
{
gotoxy(20,i+6); cout<<i+1;
gotoxy(35,i+6); cout<<bottle[i];
gotoxy(60,i+6); cout<<cost[i];
}
gotoxy(25,25); cout<<"PRESS ANY KEY TO CONTINUE"; getch();
clrscr();
gotoxy(35,1); cout<<"BEER";
for(i=13;i<18;i++)
{
gotoxy(20,i-10); cout<<i+1;
gotoxy(35,i-10); cout<<bottle[i];
gotoxy(60,i-10); cout<<cost[i];
}
gotoxy(35,10); cout<<"WINE";
for(i=18;i<22;i++)
{
gotoxy(20,i-6); cout<<i+1;
gotoxy(35,i-6); cout<<bottle[i];
gotoxy(60,i-6); cout<<cost[i];
}
gotoxy(35,18); cout<<"RUM";
for(i=22;i<26;i++)
{
gotoxy(20,i-2); cout<<i+1;
gotoxy(35,i-2); cout<<bottle[i];
gotoxy(60,i-2); cout<<cost[i];
}
gotoxy(25,25); cout<<"PRESS ANY KEY TO CONTINUE"; getch();
clrscr();
gotoxy(35,1); cout<<"CHAMPAIGNE";
for(i=26;i<29;i++)
{
gotoxy(20,i-23); cout<<i+1;
gotoxy(35,i-23); cout<<bottle[i];
gotoxy(60,i-23); cout<<cost[i];
}
gotoxy(35,8); cout<<"SODA";
for(i=29;i<31;i++)
{
gotoxy(20,i-19); cout<<i+1;
gotoxy(35,i-19); cout<<bottle[i];
gotoxy(60,i-19); cout<<cost[i];
}
gotoxy(35,14); cout<<"WATER";
gotoxy(20,16); cout<<"32";
gotoxy(35,16); cout<<"EVIAN BRAND";
gotoxy(60,16); cout<<"80";
gotoxy(25,25); cout<<"PRESS ANY KEY TO CONTINUE"; getch();
clrscr();
int answ,fc,fch[32],fe=0,z=-1;
char fi[32][20],answe;
RETRY:
clrscr();
cout<<"PRESS 0 TO GO BACK TO THE LIST OF ITEMS\n"
<<"PRESS 1 TO CONTINUE ";
cin>>answ;
switch(answ)
{
case 0 : clrscr();
goto START;
// break;
case 1 : clrscr();
do
{
z++;
cout<<"ENTER THE CODE YOU WANT TO HAVE :: ";
cin>>fc;
fch[z]=cost[fc-1];
fe+=cost[fc-1];
strcpy(fi[z],bottle[fc-1]);
cout<<"DO YOU WANT MORE(Y/N) :: ";
cin>>answe;
} while(answe=='y'||answe=='Y');
clrscr();
for(int y=0;y<z+1;y++)
{
cout<<fi[y];
gotoxy(40,y+1);
cout<<fch[y]<<"\n";
}
cout<<"TOTAL";
gotoxy(40,y+1);
cout<<fe<<"\n";
cout<<"ARE YOU STAYING IN THIS HOTEL (Y/N) ? ";
char ans;
cin>>ans;
if(ans=='y' || ans=='Y')
{
char na[25];
int rn;
cout<<"ROOM NO. :: ";
cin>>rn;
cout<<"NAME :: ";
gets(na);
int l=strlen(na);
for(i=0;i<l;i++) na[i]=toupper(na[i]);
//VERIFYING THE ENTERED DATA
f1.open("HOT.EL",ios::in|ios::binary);
f1.read((char *)&d,sizeof(d));
while(f1)
{
if(d.roomno==rn && strcmp(d.name,na)==0)
{
f1.close();
goto BILL;
}
f1.read((char *)&d,sizeof(d));
}
f1.close();
cout<<"ENTERED DATA IS NOT MATCHING THE ACTUAL
DATA";
gotoxy(25,25); cout<<"PRESS ANY KEY AFTER PAYING THE BILL
";
getch();
return;
BILL:
//ENTERING THE BAR CHARGE INTO THE FILE
f8.open("BILL.DAT",ios::in|ios::binary);
f8.read((char *)&b,sizeof(b));
int first=0;
cout<<" \nVisiting first ";
cout<<" \nPress 1 if Yes ";
cout<<" \nPress 0 if No";
cin>>first;
if (first == 1)
{
b[rn-1].bbar = 0;
b[rn-1].bbar+=fe;
}
else
b[rn-1].bbar+=fe;
f8.close();
f8.open("BILL.DAT",ios::out|ios::binary);
f8.write((char *)&b,sizeof(b));
f8.close();
gotoxy(25,30);
cout<<"THE BAR BILL HAS BEEN ENTERED INTO YOUR
RECORD";
}
else
{
gotoxy(25,25);
cout<<"PRESS ANY KEY AFTER PAYING THE BILL ";
getch();
return;
}
gotoxy(25,25);
cout<<"PRESS ANY KEY TO CONTINUE";
getch();
break;
default: cout<<"YOU HAVE PRESSED A WRONG KEY\nRETRY\n"
<<"\n\n\n\nPRESS ANY KEY TO CONTINUE\n";
getch();
goto RETRY;
}
clrscr();
}
void HOTEL::swimming_pool()
{
START:
clrscr();
int choice;
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
cleardevice();
settextstyle(10,0,1);
setcolor(MAGENTA);
outtextxy(10,10,"I am staying in this hotel");
setcolor(LIGHTRED);
outtextxy(10,50,"I am a member of this facility");
setcolor(LIGHTGREEN);
outtextxy(10,90,"I want to be its member");
setcolor(LIGHTGRAY);
outtextxy(10,130,"I am not eligible to use this facility");
setcolor(RED);
outtextxy(10,170,"Back to options");
setcolor(MAGENTA);
int x=0,y=0;
outtextxy(x,y,".");
char W;
int count=0;
do
{
count++;
W=getch();
if(W=='\0'+'H')
{
setcolor(BLACK);
outtextxy(x,y,".");
y-=40;
if(y<0)
{
y=160;
setcolor(RED);
outtextxy(x,y,".");
choice=5;
}
else if(y==0)
{
setcolor(MAGENTA);
outtextxy(x,y,".");
choice=1;
}
else if(y==40)
{
setcolor(LIGHTRED);
outtextxy(x,y,".");
choice=2;
}
else if(y==80)
{
setcolor(LIGHTGREEN);
outtextxy(x,y,".");
choice=3;
}
else if(y==120)
{
setcolor(LIGHTGRAY);
outtextxy(x,y,".");
choice=4;
}
else if(y==160)
{
setcolor(RED);
outtextxy(x,y,".");
choice=5;
}
}
else if(W=='\0'+'P')
{
setcolor(BLACK);
outtextxy(x,y,".");
y+=40;
if(y>160)
{
y=0;
setcolor(MAGENTA);
outtextxy(x,y,".");
choice=1;
}
else if(y==0)
{
setcolor(MAGENTA);
outtextxy(x,y,".");
choice=1;
}
else if(y==40)
{
setcolor(LIGHTRED);
outtextxy(x,y,".");
choice=2;
}
else if(y==80)
{
setcolor(LIGHTGREEN);
outtextxy(x,y,".");
choice=3;
}
else if(y==120)
{
setcolor(LIGHTGRAY);
outtextxy(x,y,".");
choice=4;
}
else if(y==160)
{
setcolor(RED);
outtextxy(x,y,".");
choice=5;
}
}
else if(count==1&&W==13) choice=1;
} while(W!=13);
closegraph();
char na[25];
switch(choice)
{
case 1 : textcolor(9);
clrscr();
int rn;
cout<<"ROOM NUMBER :: ";
cin>>rn;
cout<<"NAME :: ";
gets(na);
int l=strlen(na);
for(int i=0;i<l;i++) na[i]=toupper(na[i]);
//VERIFYING THE ENTERED DATA
f1.open("HOT.EL",ios::in|ios::binary);
f1.read((char *)&d,sizeof(d));
while(f1)
{
if(d.roomno==rn && strcmp(d.name,na)==0)
{
f1.close();
cout<<"\n\nYOU MAY USE THIS FACILITY";
goto PROCEED;
}
f1.read((char *)&d,sizeof(d));
}
f1.close();
cout<<"\n\nSORRY.ENTERED DATA IS NOT MATCHING THE
ACTUAL DATA"
<<"\nYOU CAN NOT USE THIS FACILITY";
PROCEED:
gotoxy(25,25);
cout<<"PRESS ANY KEY TO CONTINUE";
getch();
goto START;
case 2 : textcolor(8);
clrscr();
char od[11],id[11];
int mems;
cout<<"MEMBERSHIP NUMBER :: ";
cin>>mems;
cout<<"NAME :: ";
gets(na);
l=strlen(na);
for(i=0;i<l;i++) na[i]=toupper(na[i]);
cout<<"TODAY'S DATE(dd/mm/yyyy) :: ";
gets(od);
//VERIFYING THE ENTERED DATA
f4.open("SWIMM.ING",ios::in|ios::binary);
while(f4)
{
f4.read((char *)&ms,sizeof(ms));
if(ms.memno==mems && strcmp(ms.name,na)==0)
{
else if(test[5]==test[4]&&test[5]==test[3])
{
line(245,240,395,240);
goto r;
}
}
else if(b==6)
{
if(test[0]==test[6]&&test[6]==test[3])
{
line(270,165,270,315);
goto r;
}
else if(test[6]==test[4]&&test[6]==test[2])
{
line(395,165,245,315);
goto r;
}
else if(test[6]==test[7]&&test[6]==test[8])
{
line(245,290,395,290);
goto r;
}
}
else if(b==7)
{
if(test[7]==test[1]&&test[7]==test[4])
{
line(320,165,320,315);
goto r;
}
else if(test[7]==test[6]&&test[7]==test[8])
{
line(245,290,395,290);
goto r;
}
}
else if(b==8)
case 2 : outtextxy(300,1,"3"); delay(2000);
setcolor(YELLOW);
outtextxy(300,1,"3");
break;
case 3 : outtextxy(300,1,"4"); delay(2000);
setcolor(YELLOW);
outtextxy(300,1,"4");
break;
case 4 : outtextxy(300,1,"5"); delay(2000);
setcolor(YELLOW);
outtextxy(300,1,"5");
break;
case 5 : outtextxy(300,1,"6"); delay(2000);
setcolor(YELLOW);
outtextxy(300,1,"6");
}
if(p1+z1+1>100) goto A;
if(ab[p1]=='r') setcolor(LIGHTRED);
else if(ab[p1]=='b') setcolor(LIGHTBLUE);
else if(ab[p1]=='y') setcolor(YELLOW);
else if(ab[p1]=='g') setcolor(GREEN);
settextstyle(10,0,2);
outtextxy(x1,y1,".");
for(i=0;i<z1+1;i++)
{
if(q==0) { x1+=x;goto cd; }
if(y==1) x1+=x;
if(x1==588) { y1-=46;x=-62;y=0; }
else if(x1==30&&count!=1) { y1-=46;x=62;y=0; }
else if(x1==30) x=62;
if(y!=0&&y!=1) x1+=x;
cd:
setcolor(RED);
outtextxy(x1,y1,".");
delay(1000);
p1++;
if(p1==100)
{
cleardevice();
for(int j=0;j<15;j++)
{
setbkcolor(0);
sound(2000); delay(100);
setbkcolor(RED);
delay(100);
}
nosound();
getch();
exit(0);
}
y++; q++;
if(i!=z1)
{
if(ab[p1]=='r') setcolor(LIGHTRED);
else if(ab[p1]=='b') setcolor(LIGHTBLUE);
else if(ab[p1]=='y') setcolor(YELLOW);
else if(ab[p1]=='g') setcolor(GREEN);
outtextxy(x1,y1,".");
}
}
board();
if(z1==5) goto C;
if(b[p1]=='l'||b[p1]=='s')
{
q=0;
if(b[p1]=='l')
{
sound(2000); delay(1000);
sound(3000); delay(1000);
nosound();
delay(1000);
}
else
{
sound(200); delay(1000);
sound(300); delay(1000);
nosound();
delay(1000);
}
if(ab[p1]=='r') setcolor(LIGHTRED);
else if(ab[p1]=='b') setcolor(LIGHTBLUE);
else if(ab[p1]=='y') setcolor(YELLOW);
else if(ab[p1]=='g') setcolor(GREEN);
outtextxy(x1,y1,".");
switch(p1)
{
case 8 : p1=26;x1=340;y1=303;x=62;break;
case 19 : p1=38;x1=154;y1=257;x=-62;break;
case 21 : p1=82;x1=92;y1=27;x=62;break;
case 28 : p1=53;x1=464;y1=165;x=-62;break;
case 36 : p1=57;x1=216;y1=165;x=-62;break;
case 43 : p1=77;x1=216;y1=73;x=-62;break;
case 50 : p1=91;x1=588;y1=-19;x=-62;break;
case 54 : p1=88;x1=464;y1=27;x=62;break;
case 62 : p1=96;x1=278;y1=-19;x=-62;break;
case 66 : p1=87;x1=402;y1=27;x=62;break;
case 61 : p1=99;x1=92;y1=-19;x=-62;break;
case 46 : p1=15;x1=340;y1=349;x=-62;break;
case 48 : p1=9;x1=526;y1=395;x=62;break;
case 52 : p1=11;x1=588;y1=349;x=-62;break;
case 59 : p1=18;x1=154;y1=349;x=-62;break;
case 64 : p1=24;x1=216;y1=303;x=62;break;
case 69 : p1=33;x1=464;y1=257;x=-62;break;
case 83 : p1=22;x1=92;y1=303;x=62;break;

{
setcolor(DARKGRAY);
outtextxy(x,y,".");
choice=3;
}
else if(y==197)
{
setcolor(RED);
outtextxy(x,y,".");
choice=4;
}
else if(y==237)
{
setcolor(CYAN);
outtextxy(x,y,".");
choice=5;
}
else if(y==277)
{
setcolor(WHITE);
outtextxy(x,y,".");
choice=6;
}
}
else if(W=='\0'+'P')
{
setcolor(BLACK);
outtextxy(x,y,".");
y+=40;
if(y>277)
{
y=77;
setcolor(YELLOW);
outtextxy(x,y,".");
choice=1;
}
else if(y==77)
{
setcolor(YELLOW);
outtextxy(x,y,".");
choice=1;
}
else if(y==117)
{
setcolor(LIGHTRED);
outtextxy(x,y,".");
choice=2;
}
else if(y==157)
{
setcolor(DARKGRAY);
outtextxy(x,y,".");
choice=3;
}
else if(y==197)
{
setcolor(RED);
outtextxy(x,y,".");
choice=4;
}
else if(y==237)
{
setcolor(CYAN);
outtextxy(x,y,".");
choice=5;
}
else if(y==277)
{
setcolor(WHITE);
outtextxy(x,y,".");
choice=6;
}
}
else if(count==1&&W==13) choice=1;
} while(W!=13);
closegraph();
switch(choice)
{
case 1 : textcolor(6);
clrscr();
//DATA OF PEOPLE STAYING IN THE HOTEL
f1.open("HOT.EL",ios::in|ios::binary);
f1.read((char *)&d,sizeof(d));
while(f1)
{
cout<<"ROOM NO. :: "<<d.roomno<<"\n"
<<"NAME :: "<<d.name<<"\n"
<<"ADDRESS :: "<<d.address<<"\n"
<<"TEL.NO :: "<<d.telno<<"\n"
<<"CHECK-IN DATE:: "<<d.date<<"\n"
<<"ROOM TYPE :: "<<d.roomtype<<"\n\n\n";
getch();
f1.read((char *)&d,sizeof(d));
}
f1.close();
clrscr();
goto START;
case 2 : textcolor(12);
clrscr();
//DATA OF PEOPLE WHO HAVE CHECKED-OUT
f2.open("C.OUT",ios::in|ios::binary);
f2.read((char *)&C,sizeof(C));
while(f2)
{
cout<<"ROOM NO. :: "<<C.roomno<<"\n"
<<"NAME :: "<<C.name<<"\n"
<<"ADDRESS :: "<<C.address<<"\n"
<<"TELEPHONE NO. :: "<<C.telno<<"\n"
<<"CHECK-IN DATE :: "<<C.date<<"\n"
<<"CHECK-OUT DATE :: "<<C.odate<<"\n"
<<"CHECK-OUT TIME :: "<<C.otime<<"\n\n\n";
getch();
f2.read((char *)&C,sizeof(C));
}
clrscr();
f2.close();
goto START;
case 3 : textcolor(8);
clrscr();
//DATA OF PEOPLE WHO HAVE CANCELLED
f3.open("CAN.CEL",ios::in|ios::binary);
f3.read((char *)&D,sizeof(D));
while(f3)
{
cout<<"NAME :: "<<D.name<<"\n"
<<"ADDRESS :: "<<D.address<<"\n"
<<"TELEPHONE NO. :: "<<D.telno<<"\n\n\n";
getch();
f3.read((char *)&D,sizeof(D));
}
clrscr();
f3.close();
goto START;
case 4 : textcolor(2);
clrscr();
//DATA OF MEMBERS OF SWIMMING POOL
f4.open("SWIMM.ING",ios::in|ios::binary);
f4.read((char *)&ms,sizeof(ms));
while(f4)
{
cout<<"MEMBERSHIP NO.:: "<<ms.memno<<"\n"
<<"NAME :: "<<ms.name<<"\n"
<<"ADDRESS :: "<<ms.address<<"\n"
<<"TELEPHONE :: "<<ms.telno<<"\n"
<<"VALID TILL :: ";
for(int i=0;i<6;i++) cout<<ms.date[i];
int y1,y2,y3,y4,y;
y1=ms.date[6]-48;
y2=ms.date[7]-48;
y3=ms.date[8]-48;
y4=ms.date[9]-48;
y=y1*1000+y2*100+y3*10+y4+1;
cout<<y<<"\n\n\n";
getch();
f4.read((char *)&ms,sizeof(ms));
}
clrscr();
f4.close();
goto START;
case 5 : textcolor(9);
clrscr();
//DATA OF MEMBERS OF GYMNASIUM
f6.open("GYM.IUM",ios::in|ios::binary);
f6.read((char *)&mg,sizeof(mg));
while(f6)
{
cout<<"MEMBERSHIP NO.:: "<<mg.memno<<"\n"
<<"NAME :: "<<mg.name<<"\n"
<<"ADDRESS :: "<<mg.address<<"\n"
<<"TELEPHONE :: "<<mg.telno<<"\n"
<<"VALID TILL :: ";
for(int i=0;i<6;i++) cout<<mg.date[i];
int y1,y2,y3,y4,y;
y1=mg.date[6]-48;
y2=mg.date[7]-48;
y3=mg.date[8]-48;
y4=mg.date[9]-48;
y=y1*1000+y2*100+y3*10+y4+1;
cout<<y<<"\n\n\n";
getch();
f6.read((char *)&mg,sizeof(mg));
}
clrscr();
f6.close();
goto START;
}
clrscr();
}
void main()
{
// STARTING PAGE
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
setbkcolor(0);
delay(1000);
setcolor(RED);
settextstyle(4,0,5);
outtextxy(230,50,"WELCOME"); delay(1000);
settextstyle(7,0,5);
setcolor(BLUE);
outtextxy(290,150,"TO"); delay(1000);
settextstyle(8,0,5);
setcolor(GREEN);
outtextxy(245,250,"HOTEL"); delay(1000);
setcolor(WHITE);
settextstyle(5,0,5);
for(int i=-225,j=639;i<71;i++,j--)
{
outtextxy(i,360,"SUNSHINE"); outtextxy(j,360,"PLAZA");
delay(15); setcolor(BLACK);
outtextxy(i,360,"SUNSHINE"); outtextxy(j,360,"PLAZA");
setcolor(WHITE);
}
outtextxy(70,360,"SUNSHINE");
outtextxy(j,360,"PLAZA"); delay(1000);
i=1;
setbkcolor(BLACK);
do
{
setcolor(i);
settextstyle(4,0,5);
outtextxy(230,50,"WELCOME"); delay(100);
settextstyle(7,0,5);
setcolor(i+1);
outtextxy(290,150,"TO"); delay(100);
settextstyle(8,0,5);
setcolor(i+2);
outtextxy(245,250,"HOTEL"); delay(100);
setcolor(i+3);
settextstyle(5,0,5);
outtextxy(70,360,"SUNSHINE");
outtextxy(j,360,"PLAZA"); delay(100);
i++;
} while(i!=13);
delay(1000); cleardevice();
settextstyle(0,0,0);
for(i=400;i>=0;i--) { setcolor(BLUE); circle(320,240,i); delay(5); }
for(i=0;i<=400;i++) { setcolor(RED); circle(320,240,i); delay(5); }
// MAP SHOWING TOP VIEW OF THE HOTEL
cleardevice();
setbkcolor(BLACK);
setcolor(WHITE);
outtextxy(150,0,"TOP VIEW OF HOTEL SUNSHINE PLAZA");
line(20,20,20,460); delay(15);
line(100,20,60,100); delay(15);
line(20,20,100,20); delay(15);
line(20,100,60,100); delay(15);
line(60,100,60,380); delay(15);
line(20,380,60,380); delay(15);
line(60,380,100,460); delay(15);
line(20,460,100,460); delay(15);
line(620,20,620,460); delay(15);
line(540,20,620,20); delay(15);
line(540,460,620,460); delay(15);
line(620,100,580,100); delay(15);
line(620,380,580,380); delay(15);
line(580,100,580,380); delay(15);
line(540,20,580,100); delay(15);
line(580,380,540,460); delay(15);
line(170,20,470,20); delay(15);
line(170,20,130,100); delay(15);
line(130,100,130,200); delay(15);
line(130,200,245,200); delay(15);
line(245,200,245,180); delay(15);
line(295,180,295,200); delay(15);
line(295,200,510,200); delay(15);
line(510,200,510,100); delay(15);
line(510,100,470,20); delay(15);
line(175,40,150,100); delay(15);
line(150,100,150,180); delay(15);
line(150,180,490,180); delay(15);
line(490,180,490,100); delay(15);
line(490,100,465,40); delay(15);
line(465,40,175,40); delay(15);
line(245,270,245,250); delay(15);
line(245,250,130,250); delay(15);
line(130,250,130,380); delay(15);
line(130,380,170,460); delay(15);
line(170,460,470,460); delay(15);
line(470,460,510,380); delay(15);
line(510,380,510,250); delay(15);
line(510,250,295,250); delay(15);
line(295,250,295,270); delay(15);
line(170,280,310,280); delay(15);
line(310,280,310,340); delay(15);
line(310,340,170,340); delay(15);
line(170,340,170,280); delay(15);
line(330,280,470,280); delay(15);
line(470,280,470,340); delay(15);
line(470,340,330,340); delay(15);
line(330,340,330,280); delay(15);
line(170,350,470,350); delay(15);
line(470,350,470,410); delay(15);
line(470,410,170,410); delay(15);
line(170,410,170,350); delay(15);
line(320,350,320,410); delay(15);
setcolor(WHITE);
int poly[8]={20,100,60,100,100,20,20,20};
setfillstyle(1,GREEN);
fillpoly(4,poly); delay(15);
int poly1[8]={20,380,20,460,100,460,60,380};
setfillstyle(1,GREEN);
fillpoly(4,poly1); delay(15);
int poly2[8]={540,20,580,100,620,100,620,20};
setfillstyle(1,GREEN);
fillpoly(4,poly2); delay(15);
int poly3[8]={540,460,620,460,620,380,580,380};
setfillstyle(1,GREEN);
fillpoly(4,poly3); delay(15);
int poly4[8]={170,280,170,340,310,340,310,280};
setfillstyle(1,9);
fillpoly(4,poly4); delay(15);
int poly5[8]={330,280,330,340,470,340,470,280};
setfillstyle(1,9);
fillpoly(4,poly5); delay(15);
int poly6[8]={20,100,20,380,60,380,60,100};
setfillstyle(9,8);
fillpoly(4,poly6); delay(15);
int poly7[8]={580,100,580,380,620,380,620,100};
setfillstyle(9,8);
fillpoly(4,poly7); delay(15);
int poly8[12]={175,40,150,100,150,180,490,180,490,100,465,40};
setfillstyle(9,12);
fillpoly(6,poly8); delay(15);
int poly9[8]={170,350,170,410,320,410,320,350};
setfillstyle(9,RED);
fillpoly(4,poly9); delay(15);
int poly10[8]={320,350,320,410,470,410,470,350};
setfillstyle(9,RED);
fillpoly(4,poly10); delay(15);
outtextxy(46,60,"LAWN"); delay(15);
outtextxy(566,60,"LAWN"); delay(15);
outtextxy(566,420,"GYM"); delay(15);
outtextxy(46,420,"GYM"); delay(15);
outtextxy(175,310,"SWIMMING POOL"); delay(15);
outtextxy(335,310,"SWIMMING POOL"); delay(15);
outtextxy(316,100,"HOTEL"); delay(15);
outtextxy(220,380,"RESTAURANT"); delay(15);
outtextxy(370,380,"BAR"); delay(15);
setcolor(WHITE);
outtextxy(110,25,"ENTRY"); delay(15);
outtextxy(480,25,"ENTRY"); delay(15);
outtextxy(110,455,"EXIT"); delay(15);
outtextxy(480,455,"EXIT"); delay(15);
outtextxy(250,190,"ENTRY"); delay(15);
outtextxy(250,260,"ENTRY"); delay(15);
settextstyle(0,1,0);
outtextxy(38,120,"UNDERGROUND TAXI STAND"); delay(15);
outtextxy(598,120,"UNDERGROUND PARKING"); delay(15);
settextstyle(0,0,0);
setcolor(BLUE);
for(i=0;i<5;i++)
{
outtextxy(200,464,"PRESS ANY KEY TO CONTINUE"); delay(200);
setcolor(BLACK);
outtextxy(200,464,"PRESS ANY KEY TO CONTINUE"); delay(200);
setcolor(BLUE);
}
outtextxy(200,464,"PRESS ANY KEY TO CONTINUE");
getch();
cleardevice();
for(i=400;i>=0;i--) { setcolor(8); circle(320,240,i); delay(5); }
for(i=0;i<=400;i++) { setcolor(12); circle(320,240,i); delay(5); }
closegraph();
// MAIN OPTIONS
int times=0;
LABEL:
times++;
int count=0;
initgraph(&gd,&gm,"c:\\tc\\bgi");
int option_code=0;
setbkcolor(BLACK);
setcolor(CYAN);
settextstyle(10,0,5);
outtextxy(180,-20,"OPTIONS ");
settextstyle(10,0,1);
setcolor(BLUE);
if(times==1)
{
delay(1000);
line(100,70,540,70);delay(1000);
setcolor(LIGHTRED);
outtextxy(220,80,"Booking"); delay(1000);
setcolor(RED);
outtextxy(220,110,"Check in"); delay(1000);
setcolor(BLUE);
outtextxy(220,140,"Check out"); delay(1000);
setcolor(DARKGRAY);
outtextxy(220,170,"Cancellation"); delay(1000);
setcolor(CYAN);
outtextxy(220,200,"Restaurant"); delay(1000);
setcolor(MAGENTA);
outtextxy(220,230,"Bar"); delay(1000);
setcolor(GREEN);
outtextxy(220,260,"Taxi Service"); delay(1000);
setcolor(BROWN);
outtextxy(220,290,"Swimming Pool"); delay(1000);
setcolor(LIGHTBLUE);
outtextxy(220,320,"Gymnasium"); delay(1000);
setcolor(LIGHTGREEN);
outtextxy(220,350,"Games"); delay(1000);
setcolor(LIGHTMAGENTA);
outtextxy(220,380,"View Data"); delay(1000);
setcolor(WHITE);
outtextxy(220,410,"Quit"); delay(1000);
}
else
{
line(100,70,540,70);
setcolor(LIGHTRED);
outtextxy(220,80,"Booking");
setcolor(RED);
outtextxy(220,110,"Check in");
setcolor(BLUE);
outtextxy(220,140,"Check out");
setcolor(DARKGRAY);
outtextxy(220,170,"Cancellation");
setcolor(CYAN);
outtextxy(220,200,"Restaurant");
setcolor(MAGENTA);
outtextxy(220,230,"Bar");
setcolor(GREEN);
outtextxy(220,260,"Taxi Service");
setcolor(BROWN);
outtextxy(220,290,"Swimming Pool");
setcolor(LIGHTBLUE);
outtextxy(220,320,"Gymnasium");
setcolor(LIGHTGREEN);
outtextxy(220,350,"Games");
setcolor(LIGHTMAGENTA);
outtextxy(220,380,"View Data");
setcolor(WHITE);
outtextxy(220,410,"Quit");
}
// FOR MOVING THE CURSOR UP OR DOWN
int x=190,y=70;
setcolor(LIGHTRED);
outtextxy(x,y,".");
char W;
do
{
count++;
W=getch();
if(W=='\0'+'H')
{
setcolor(BLACK);
outtextxy(x,y,".");
y-=30;
if(y<70)
{
y=400;
setcolor(WHITE);
outtextxy(x,y,".");
option_code=12;
}
else if(y==70)
{
setcolor(LIGHTRED);
outtextxy(x,y,".");
option_code=1;
}
else if(y==100)
{
setcolor(RED);
outtextxy(x,y,".");
option_code=2;
}
else if(y==130)
{
setcolor(BLUE);
outtextxy(x,y,".");
option_code=3;
}
else if(y==160)
{
setcolor(DARKGRAY);
outtextxy(x,y,".");
option_code=4;
}
else if(y==190)
{
setcolor(CYAN);
outtextxy(x,y,".");
option_code=5;
}
else if(y==220)
{
setcolor(MAGENTA);
outtextxy(x,y,".");
option_code=6;
}
else if(y==250)
{
setcolor(GREEN);
outtextxy(x,y,".");
option_code=7;
}
else if(y==280)
{
setcolor(BROWN);
outtextxy(x,y,".");
option_code=8;
}
else if(y==310)
{
setcolor(LIGHTBLUE);
outtextxy(x,y,".");
option_code=9;
}
else if(y==340)
{
setcolor(LIGHTGREEN);
outtextxy(x,y,".");
option_code=10;
}
else if(y==370)
{
setcolor(LIGHTMAGENTA);
outtextxy(x,y,".");
option_code=11;
}
else if(y==400)
{
setcolor(WHITE);
outtextxy(x,y,".");
option_code=12;
}
}
else if(W=='\0'+'P')
{
setcolor(BLACK);
outtextxy(x,y,".");
y+=30;
if(y>400)
{
y=70;
setcolor(LIGHTRED);
outtextxy(x,y,".");
option_code=1;
}
else if(y==70)
{
setcolor(LIGHTRED);
outtextxy(x,y,".");
option_code=1;
}
else if(y==100)
{
setcolor(RED);
outtextxy(x,y,".");
option_code=2;
}
else if(y==130)
{
setcolor(BLUE);
outtextxy(x,y,".");
option_code=3;
}
else if(y==160)
{
setcolor(DARKGRAY);
outtextxy(x,y,".");
option_code=4;
}
else if(y==190)
{
setcolor(CYAN);
outtextxy(x,y,".");
option_code=5;
}
else if(y==220)
{
setcolor(MAGENTA);
outtextxy(x,y,".");
option_code=6;
}
else if(y==250)
{
setcolor(GREEN);
outtextxy(x,y,".");
option_code=7;
}
else if(y==280)
{
setcolor(BROWN);
outtextxy(x,y,".");
option_code=8;
}
else if(y==310)
{
setcolor(LIGHTBLUE);
outtextxy(x,y,".");
option_code=9;
}
else if(y==340)
{
setcolor(LIGHTGREEN);
outtextxy(x,y,".");
option_code=10;
}
else if(y==370)
{
setcolor(LIGHTMAGENTA);
outtextxy(x,y,".");
option_code=11;
}
else if(y==400)
{
setcolor(WHITE);
outtextxy(x,y,".");
option_code=12;
}
}
else if(count==1&&W==13)
{
closegraph();
H.booking();
goto LABEL;
}
}while(W!=13);
closegraph();
// FOR GOING TO THE SPECIFIED OPTION
switch(option_code)
{
case 1:H.booking();
break;
case 2:H.check_in();
break;
case 3:H.check_out();
break;
case 4:H.cancellation();
break;
case 5:H.restaurant();
break;
case 6:H.bar();
break;
case 7:H.taxi_service();
break;
case 8:H.swimming_pool();
break;
case 9:H.gymnasium();
break;
case 10:H.games();
break;
case 11:H.view_data();
break;
case 12:exit(0);
}
goto LABEL;
}
void board()
{
settextstyle(10,0,2);
setcolor(RED);
line(530,80,600,225);
line(150,80,100,340);
line(535,185,490,300);
line(450,189,130,430);
line(230,165,210,350);
line(100,220,155,400);
line(530,220,600,400);
line(495,265,530,435);
line(370,270,350,390); }
OUTPUT

BOOKING

CHECK IN
CHECK OUT

VIEW DATA

CANCELLATION
Data Flow Diagram:
The DFD was first designed by Larry Constantine as a way of expressing
system requirements in a graphical form; this led to a modular design.
A DFD, also known as “bubble chart,” has the purpose of clarifying system
requirements and identifying major transformations that will become programs
in system design. So it is the starting point of the design phase that
functionally decomposes the requirement specifications down to the lowest
level of detail. A DFD consists of series of bubbles joined by lines represent
data flows in the system.

DFD describes what data flow (logical) rather than how they are processed, so
it does not depend on hardware, software, data structure, or file organization.
The key question that we are trying to answer is: what major transformations
must occur for input to be correctly transformed into output.
DFD SYMBOLS:
In the DFD, there are four symbols.
1. A square defines a source (originator) or destination of system data.
2. An arrow identifies data flow- data in motion. It is a pipeline through
which
information flows.
3. A circle or a “bubble” (some people use an oval bubble) represents a
process that transforms incoming data flows(s) into outgoing data
flow(s).
4. An open rectangle is a data store-data at rest, or a temporary repository
of data .
SYMBOLS MEANING

Source or destination of data

Data Flow

Process that transforms data


Flow

Data Store
CONSTRUCTING DFD:
Several rules of thumb are used in drawing DFDs:
Processes should be named and numbered for easy reference. Each name
should be representative of the process.

The direction of flow is from top to bottom and from left to right. Data
traditionally flow from the source (upper left corner) to the destination (lower
right corner), although they may flow back to a source. One way to indicate
this is to draw a long flow line back to the source. An alternative way is to
repeat the source symbol as a destination. Since it is used more than once in
the DFD, it is marked with a short diagonal in the lower right corner When a
process is exploded into lower-level details, they are numbered the names of
data sources and destinations are written in capital letters. Process and data
flows names have the first letter of each word capitalized.

HOW DETAILED SHOULD A DFD BE?


The DFD is designed to aid communication. If it contains dozens of processes
and data stores it gets too unwieldy. The rule thumb is to explode the DFD to
a functional level, so

that the next sublevel does not exceed 10 processes. Beyond that, it is best to
take each function separately and expand it show the explosion of the single
process. If a user wants to know what happens within a given process, then
the detailed explosion of that process may be shown.

A DFD typically shows the minimum contents of data elements that flow in and
out.

A leveled set has a starting DFD, which is a very abstract representation of the
system, identifying the major inputs and outputs and the major processes in
the system. Then each process is refined and a DFD is drawn for the process.
In other words, a bubble DFD is expanded into a DFD during refinement. For
the hierarchy to be consistent, it is important that the net inputs and outputs
of the DFD for a process are the same as the inputs and outputs of the process
are the same as the inputs and the outputs of the process in the higher level
DFD.

This refinement stops if each bubble can be easily identified or understood. It


should be pointed out that during refinement, though the net input and output
are preserved, a refinement of the data might also occur. That is , a unit of
data may be broken into its components for processing when the detailed DFD
for a process is being drawn .So , as the process are decomposed, data
decomposition also occurs.

The DFD methodology is quite effective, especially when the required designs
is unclear the analyst need a notational language for communication. The DFD
is easy to understand for communication. The DFD is easy to understand after
a brief orientation.
Employee
Employee Employee
Details Employee Section
Section
Customer & details

Hotel Hotel
Section Hotel details Section
Hotel details

Customer & food


Restaurant Details
Queens
Section Restaurant
Hotel
Food details Section
Information
Section
Customer & games Game
Game Details details Game
Section Section
Expenses
Details Details
Expenses
Expanses
Details
Expenses Expenses
Shopping
details
Shopping
& Items
Details

Shop
Shop Section
Section

Physical data flow diagram of hotel management system


Hotel
Get year & month Good purchased

Get year & month goods purchased details

1 Get year & month Assets purchased

Monthly Calculate Hotel Asset purchased details


Expenses Total Monthly
Expenses Detail.
Total expenses

Get year & month Maintenance


Expenses
Maintenance Detail
Month Bill

Get year& month


Shop expenses
Item purchased details

Monthly
Expenses
Get year& month
Miscellaneous
Miscellaneous expenses details Expenses

2 Yearly Bill
Calculate
yearly
Bill
Get customer details
Hotel
Number of stays
Hotel department
Get cust_id

3 Get game details


Calculate Hotel Game details Game
Transaction
Details

Get Restaurant details

Restaurant details Restaurant

Generate bill

Get shop details

Item purchased details Shop


4
New employee Add new record New EMP record
Entry for new
Employee details

Employee record

5
Get id of
Employee
Employee Update record
Admin updates
Values
Update record

Employee information
Store new
New 6 Customer Details Customer
customer
Details info
Entry of Storage
New register
Customer
Details
Details of
Hotel Customer to
CurrentDepartment
Update Update customer

Details
7
Details of customer to
Restaurant Update Add,
Department Update
Delete
Transaction
Details of customer Details of
To update Customer

Game
Department
Details of
Customer to
Updat
Stop
Department
Enter order
Restaurant Details of customer
Department Generation of
Enter order 8 Customer’s
Details of customer bill Bill
Shopping Calculate Generated
Department Expenses
Related to
Customer

Gaming
Department
ER-DIAGRAM
An entity relationship model is a detailed and logical representation of the data
for an organization or for business area. The entity relationship, which is also
known as ER relationship is based on the theory of real world which consist of
a set of basic object, which are called entities and relationships among these
object.

The data model was developed to facilitate data base design by allowing
specification of an enterprise schema which represents the overall logical
structure of a database. We will present the modeling concept of ER model
which is higher level conceptual data, The ER-model does not provide the
overall data base structure but it gives the intermediate step on the basis of
which data base is designed.
The ER modeling is a technique for analysis and logical modeling of a systems
data requirements. It uses graphical notation for representing these.
Ei = Entity
Ri = Relationship
SYMBOL MEANING

Entity

Weak entity

Relationship

Attribute

Key Attribute
ER-DIGRAM OF SYSTEM

1 services to
Provides

Customer
Cust_id Name

Is
11
I

Addres
Stat s
City
e
Click out
1 In cust Out Cust
date

Room_
no
Click in date
Does
Does Transaction
Transaction

Phone

6 7
THE SYSTEM DEVELOPMENT LIFE CYCLE:
To understand system development, we need to recognize that a candidate
system has a life cycle, just like a living system or a new product. System
analysis and design are keyed to the system life cycle. The stages are shown
in figure 2-1. Then analyst must progress from one stage to another
methodically, answering key questions and achieving results in each stage.

A word of caution regarding life cycle activities: we isolate and sequence these
activates for learning purposes, but in real life they overlap and are highly
interrelated, for example, when the analyst is evaluation an existing operation,
he/she is probably thinking about an alternative way that would improve the
system or wondering whether a given piece of hardware would be a critical
cost item to consider for a candidate system.
When the system approach to problem solving is applied to the development
of information system solution, it is called application development. Most
computer based information system are conceived, designed and
implemented using some kind of system development process .in this
process, end user and information specialist design information system
based on analysis of information requirement of the user. Thus the major
part of this process is called system analysis and design.
The system development basically involves seven steps, these are:

 Nature of the problem


 Feasibility analysis
 Analysis
 Design
 Implementation
 Post implementation & maintenance
System Development Life Cycle

System
Investigation
Product: Feasibility Steady

Analysis
Product: Functional Requirement

Design
Product: System
Specification

Testing:
Product: Test Cases

Implementation
Product: Operational System

Maintenance
Product: Improved System
TESTING

Testing is the only phase in the whole software development


process that is regarded as a destructive process rather than a constructive
one. During the testing phase, the engineer creates a series of test cases that
are intended to demolish the software that has been built. The basic testing
principle that is software engineer must understand before applying methods
to design effective test cases are:
1. All tests should be traceable to customer requirements.
2. Test should be planned long before testing begins.
3. Testing should begin “in the small” and progress toward testing
“In the large”.
4. To be most effective, an independent third party should conduct
testing.

There are mainly two fundamental approaches to testing. These are:

 BLACK BOX TESTING: These check for the fundamental aspect of


a system with the little regard for the internal logic structure of the
software. Black Box tests are used to demonstrate that software
function are operational, that input is properly accepted and
output is correctly produced, and the integrity of external
information is maintained.

 WHITE BOX TESTING: These check for the correctness of the


procedural details at the grass root level of the code. White box
testing is used to ensure that internal operations are performed
according to specification and all internal components have been
adequately exercised. White box testing of software is predicated
on close examination of procedural detail. Providing test cases,
which exercise set of conditions, exercise specific of conditions and/
or loop, tests logical paths through the software.

The overall strategy for software testing may also be viewed in the context of
the spiral. The spiral model of software development has following types of
testing:
1. Unit Testing: Unit testing begins at the vortex of the spiral and
concentrates on each unit (i.e., component) of the software as implemented in
source code. Using the component level design description as a, important
control paths are tested to uncover errors within the boundary of the module.
The unit test is White-box oriented and the step can be conducted in parallel
for multiple components. Tests of flow across a module interface are required
before any other test is initiated.
In addition, local data structures should be exercised and local impact on
global data should be ascertained during unit testing.

2. Integration Testing: Integration testing focuses on the design and the


construction of the software architecture. Integration testing is a systematic
technique constructing the program structure while at the same time
conducting test to uncover error associated with interfacing. The objecting is
to take unit tested component and build a program structure that has been
dictated by design.

3. Validation Testing: In validation testing, requirements established as part


of software requirement analysis are validated against the software that has
been constructed.
Software validation is achieved through a series of black box tests that
demonstrate conformity with requirements. A test plan outlines the classes of
tests to be conducted and a test procedure. Hence, special care was taken
while performing validation testing.

4. Define specific test case that will be use to demonstrate conformity


requirement. Both the plan and the procedure are designed to ensure that
all requirement are satisfied, all behavioral characteristic are achieved,
all performance requirements are attained, documentation is correct, and
human engineered and other requirement are met.

5. System Testing: In system testing, the software and other system


elements are tested as whole. System testing is actually a series of tests
whose primary purpose is to fully exercise the computer-base system.
Although each test has a different purpose, all work to verify that system
elements have been properly integrated and perform allocated function. This is
the last test before the system can be declared successful.
DEBUGGING

Debugging occurs as consequences of successful testing. That is, when a test


case uncovers an error, debugging is the process that results in the removal of
the error. Debugging process begins with the execution of a test case. Results
are assessed and a lack of correspondence between expected and actual
performance encountered. There are basically three approaches for
debugging:

 Brute Force: This category of debugging is probable the most common


and least efficient method for isolating the cause of a software error. We
apply Brute Force debugging method when all else fails. Using the “let
the computer find the error” memory dumps are taken, run-time traces
are invoked, and the program is loaded with WRITE statements.
 Backtracking: Backtracking is a fairly common debugging approach
that can be used successfully in small programs. Beginning at the site
where a symptom has been uncovered, the code is traced backward until
the site of the cause is found.
 Cause Elimination: This approach is manifested by induction and
deduction and introduces the concept of binary portioning. Data related
to the error occurrence are organized to isolate potential causes. A
“cause hypothesis” is devised and the aforementioned data are used to
prove or disprove the hypothesis.

IMPLEMENTATION ISSUES

The implementation fields of software development are concerned with


translating design specifications into source code. The primary goal of software
implementation is to write source code and internal documentation, so that the
conformance of the code to its design specification can be verified easily and
debugging, testing and modification of the written code can be easily carried
out. This goal can be achieved by making the source code as clear and
straightforward as possible. Simplicity, clarity and refinement are the
distinctive features of a good program.

Source-code clarity is enhanced not only by structured coding technique, but


also by appropriate supporting documents, by good coding style, by good
internal comments and by features provided in modern programming
languages. Production of a high quality software require that the program
team have a good designative leader, a well defined organizational structure
and complete understanding of the duties and responsibilities of each team
member. The implementation team should be provided with well-defined sets
of software requirements and architectural design specification and a detailed
designed specification.
BIBLIOGRAPHY

1. Book that provide a great help to develop this project.

Turbo C/C++ The complete Reference, second edition- Osborne McGraw Hill.
By- HERBERT SCHILDT

2. Programming in ANSI C- McGraw Hill


By-E. BALAGURUSAMY

3. The ‘C’ Odyssey – Advanced Dos, The Uncharted Water, BPB Publication.
By- MEETA GANDHI

4. A book on C – Pearson education


By- AL KELLEY AND IRA PHOL

5. Data Structure and Program Design – PHI


By- ROBERT L. KRUSE

6. C How to program – Pearson education


By- Dietel & Dietel

Help Documentation in TC 3.0 is a great source of technical information.

You might also like