Documente Academic
Documente Profesional
Documente Cultură
INDEX
Sl. No.
1 2 3 4 5 6 7 8 9
Table of contents
TITLE OF THE PROJECT INTRODUCTION OF THE PROJECT OBJECTIVES OF THE PROJECT PROJECT CATEGORY AND PLATFORM TOOLS HARDWARE REQUIREMENT SPECIFICATION PROJECT DETAIL AND CODING DATA FLOW DIAGRAM AND MODULE DISCRIPTION VERIFICATION & VALIDATION
Page No.
4 6 7-8 9 10 11 12-34 35-63 64
10 11
TESTING BIBLIOGRAPHY
65-68 69
Introduction
This project is basically based on the day to day activity of a Hotel Operations, which controls the information like: GUEST DETAIL
ROOM STATUS
In this Hotel Reservation Sysetem project some feature are facilitated. This provides some sorts of help to the users in day to day activity i.e.
Room Booking.
Modification of Guest Detail View the Status of Room Delete the Room Booking
Objective
3
This is Hotel Reservation System project. This project has contained 4 modules and Hotel frequently used 4 tasks in day to day activity 1. Room Booking
2. Modification in Guest Detail
Room Booking Module facilitates the booking of any room available In Hotel. Modification in Guest Detail is facilitates the user to modify the detail of guest and booking information. View room status module facilitates the user to check the availability of room and booking detail of guest stayed in hotel. Delete the booking Module facilitates the user to delete the booking of any booked room.
This project is needed as it helps the user in doing his day-to-day work very easily.
After studying the existing process of the Hotel we identify the need to develop a new system. Because of the manual operation of the data in day to day activity leads delay in the process. Computerization helps to give high Accuracy of data. Computer provides data security and data transfer. Redundancy of data can be avoided. Reports of any type can generate at any time
Platform
Microsoft Windows 9X/Me/XP
Tools
I have used Turbo C as a basic programming language.The C programming language is a popular and widely used programming language for creating computer programs.C is a general purpose structured programming language that is powerful, efficient and compact. It was developed at AT &Ts Bell Laboratories of USA in 1972. It was designed and written by Dennis Ritchie. C was Programming Language (BCPL) called B. an offspring of the Basic Cambridge
Some Features of C/C++ are:1. It is reliable , simple and easy to use. 2. Programs in C are efficient and fast.This is due to variety of data types and powerful operators. 3. There are only 32 keywords and its strength lies in its built-in functions. 4. C helps in developing structured programs. 5. C is highly suitable for recursive programming. 6. It is also suitable for graphics programming. 7. C is highly portable. 8. It is highly suitable for writing both system software and business packages. 9. We can add our own functions to the library. Therefore, important feature of C is its ability to extend itself. 10. C is format free language.No line numbers are needed.need not place statements on a specified location on a line. 7
11. Standard libraries for I\O, string manipulation, Arithmetic operations etc. 12. Pointer implementation is available 13. Bitwise manipulation is possible. 14.C stands between the assembly languages and the High Level Languages.C has all the advantages of assembly language and it has the significant features of modern HLLs (High Level Languages).thats why it is often called a Middle Level Language.
Micro Processors Processing Speed Random Access Memory (RAM) Secondary Storage CD ROM Floppy Disk File System Virtual Memory Operating System
: : : : : : : : :
PentiumII Processors 550MHz 128 MB 20 GB of Hard Disk 52X CD-ROM 1.44MB 32bit 32MB Windows 9x/Me/XP
Project Detail
Welcome Page Options Page Data Entry Page (Booking) View Page Detail Modification Page Deletion Page
Option Page displays the list of function and task provided in the Project.
Data Entry page displays the list of mandatory information required for the Room Booking.
Modification page displays the option for change in details. Deletion Page displays the option to vacate the rooms
CODING
10
/ Language: C\C++ Category: Database\Files Description: Hotel Reservation */ #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <dos.h> #define size 51
void mainm(void); void entry(void); void modify(void); void delet(void); void view(void);
// Structure
11
// Initializations
for(li=70;li>=10;li--) { gotoxy(li,22); delay(30); printf("\\"); } for(lp=16;lp<=21;lp++) { gotoxy(10,lp); delay(100); printf("\\"); } for(lp=21;lp>=16;lp--) { gotoxy(70,lp); delay(100); printf("\\"); } gotoxy(16,17); textcolor(BLINK + MAGENTA); cprintf("Welcome To The ANUPAMA's Hotel Reservation System"); gotoxy(12,20); cprintf("Designed and Coded By ANUPAMA SINGH M Sc. Comp Sc.(2009-11)"); gotoxy(24,28); textcolor(LIGHTGREEN); cprintf("---*$ CODED BY $*---"); gotoxy(24,31); 13
textcolor(2); cprintf("ANUPAMA SINGH"); gotoxy(24,34); textcolor(3); cprintf("ROLL NO. 311297"); textcolor(4); gotoxy(24,37); cprintf("M Sc. Computer Science"); textcolor(5); gotoxy(24,40); textcolor(6); cprintf("MAHARSHI DAYANAND UNIVERSITY, ROHTAK (HARYANA)"); gotoxy(40,48); textcolor(BLUE); cprintf("Press Any Key To ..........Continue"); getch(); mainm(); }// Main Fuction End
printf("*"); } for(li=50;li>=30;li--) { gotoxy(li,30); delay(30); printf("*"); } for(lp=15;lp<30;lp++) { gotoxy(30,lp); delay(100); printf("|"); } for(lp=29;lp>=15;lp--) { gotoxy(50,lp); delay(100); printf("|"); } gotoxy(15,10); textcolor(LIGHTGRAY); cprintf("Press the corresponding Keys for the desired action"); gotoxy(33,16); textcolor(BROWN); cprintf("R: Reservation"); gotoxy(33,19); 15
textcolor(LIGHTMAGENTA); cprintf("V: Room Status"); gotoxy(33,22); textcolor(LIGHTBLUE); cprintf("M: Modification"); gotoxy(33,25); textcolor(LIGHTRED); cprintf("D: Deletion"); gotoxy(33,28); textcolor(GREEN); cprintf("Q: Quit"); textcolor(WHITE); choice=getch(); switch(choice) {// Choice Switch Begin case 'R': entry(); case 'V': view(); case 'M': modify(); case 'D': delet(); case 'Q': exit(0); default: {//Choice Default 16
gotoxy(33,40); printf("\n\nIllegal Choice or make sure CAPS Lock is on"); getch(); mainm();
}//Choice Default End } //Choice Switch End } //Main Menu Function End
// Data Entry Function void entry(void) {//Data Entry Function Begin clrscr(); printf("Do You Want To reserve A Room? (Y/N)\n"); echoice=getch(); switch(echoice) // Echoice Switch Begin { case 'Y': { // E-Choice Case Y Begin printf("\n\nEnter S for Single Room or D for Double Room\n\n"); rchoice=getch(); switch(rchoice) // Rchoice Switch Begin { case 'S': // Rchoice {// R-Choice Case S Begin 17
for(i=1;i<size;i++) if(sr[i]==0) {// Single Room IF begin clrscr(); sr[i]=1; printf("\n\nRoom No : %d Is available For Reservation",i); printf("\n\nEnter Occupant's Name\n"); gets(guest.name[i]); printf("\n\nEnter Occupant's NIC Number\n"); gets(guest.nic[i]); printf("\n\nEnter Check In Date\n"); gets(guest.rdate[i]); printf("\n\nEnter Check Out Date\n"); gets(guest.cdate[i]); printf("\n\n\n\nDo You Want To Reserve Another Room? Y/N"); ar=getch(); switch (ar) {// AR Switch Begin case 'Y': entry(); case 'N': mainm(); default: {//AR Default Begin printf("\n\nIllegal Choice or make sure CAPS Lock is on"); getch(); mainm(); 18
}// AR Switch End }// Single Room IF End }// Rchoice Case S End
case 'D': { //Rchoice Case D Begin for(i=1;i<size;i++) if(dr[i]==0) {// Double Room IF begin clrscr(); dr[i]=1; printf("\n\nRoom No : %d Is available For Reservation",i); printf("\n\nEnter Occupant's Name\n"); gets(guest1.name[i]); printf("\n\nEnter Occupant's NIC Number\n"); gets(guest1.nic[i]); printf("\n\nEnter Check In Date\n"); gets(guest1.rdate[i]); printf("\n\nEnter Check Out Date\n"); gets(guest1.cdate[i]); printf("\n\n\n\nDo You Want To Reserve Another Room? Y/N"); ar=getch(); switch (ar) {// AR Switch Begin case 'Y': 19
entry(); case 'N': mainm(); default: {//AR Default Begin printf("\n\nIllegal Choice or make sure CAPS Lock is on"); getch(); mainm(); }//AR Default End }// AR Switch End }// Double Room IF End }// Rchoice Case D End default: // Rchoice Default {//Rchoice Default Begin printf("\n\nIllegal Choice or make sure CAPS Lock is on"); getch(); mainm(); }//Rchoice default end }//Rchoice End }//Echoice Case Y End case 'N': {// Echoice Case N Begin mainm(); }//Echoice Case N End default: //Echoice Default printf("\n\nIllegal Choice or make sure CAPS Lock is on"); getch(); 20
// Data View Fucntion void view(void) {// Data View Function Begin clrscr(); printf("Press S for Sequential Display of the room status \ \n\nPress R for Manual Check Of Room Status\n\n"); vchoice=getch(); switch(vchoice) {//Vchoice Switch Begin case 'S': {//Vchoice Case S Begin clrscr(); printf("R.No.\tName\t\tNIC Number\tCheck In\tCheck Out\n"); for(i=1;i<size;i++) {//i Loop Begin if(sr[i]==1) {//SR[i]==1 Conditional Printing Begin printf("\n%d\t%s\t%s\t%s\t%s\n",i,guest.name[i],guest.nic[i], \ guest.rdate[i],guest.cdate[i]);
printf("\n\n\nPress Any Key For Double Room Status\n\n"); getch(); clrscr(); printf("R.No.\tName\t\tNIC Number\tCheck In\tCheck Out\n"); for(i=1;i<size;i++) {//i Loop Begin if(dr[i]==1) {//dr[i]==1 Conditional Printing Begin printf("\n%d\t%s\t%s\t%s\t%s\n",i,guest1.name[i],guest1.nic[i] \ ,guest1.rdate[i],guest1.cdate[i]);
}//dr[i]==1 Conditional Printing End }//i Loop End printf("\n\n\nPress Any Key To Return To The Main Menu\n\n"); getch(); mainm(); }//Vchoice Case S End case 'R': {// Vchoice case R Start clrscr(); printf("Enter The Room Number That Needs To Be Checked For \ Occupancy\n\n"); gets(temp); rno=atoi(temp); // Room Number Limit Check if(rno<1 || rno >51) {//IF Condition Begin 22
printf("\n\nIllegal Room Number"); getch(); mainm(); } //IF Condition End else { // Limit Else Falsified Begin if(sr[rno]==1) {//sr==1 if Begin printf("\n\nSingle Room No %d Is Reserved",rno); printf("\n\nOccupant's Name : %s \n\nOccupant's NIC Number : %s \ %s\n\nCheck Out Date : %s \n\n", \ guest.name[rno],guest.nic[rno],guest.rdate[rno],guest.cdate[rno]); \n\nCheck In Date :
}//sr==1 if End else {// sr else begin printf("\n\nSingle Room No %d is Vacant",rno); getch(); }//sr else end if(dr[rno]==1) {//dr==1 if Begin printf("\n\nDouble Room No %d Is Reserved",rno); printf("\nOccupant's Name : %s \n\nOccupant's NIC Number : \%s \n\nCheck In Date : %s\n\nCheck Out Date : %s \n\n", \ guest1.name[rno],guest1.nic[rno],guest1.rdate[rno], \ guest1.cdate[rno]); printf("\n\nPress Any Key To Return To The Main Menu"); getch(); 23
mainm(); }//dr==1 if End else {// dr else begin printf("\n\nDouble Room No %d is Vacant",rno); getch(); mainm(); }//dr else end }//Vchoice Case R End }// Falsified Limit End default: { //Vchoice Default Begin printf("\n\nIllegal Choice or make sure CAPS Lock is on"); getch(); mainm(); } // Vchoice Default End } // Vchoice Switch End } // Data View Function End
//Modify Function void modify(void) {// Modify Function Begin clrscr(); printf("\t\t\t\tData Modification\n\n\n\n\n\n"); 24
printf("Enter The Room Number To Be Modified\n"); gets(temp); rno=atoi(temp); // Room Number Limit Check if(rno<1 || rno >51) {//IF Condition Begin printf("\n\nIllegal Room Number"); getch(); mainm(); } //IF Condition End else { // Limit Else Falsified Begin printf("Enter S For Single Room / D For Double Room\n"); rc=getch(); switch(rc) {//rc Switch Begin case 'S': {//rc Case S Begin if(sr[rno]==1) {//sr==1 if Begin clrscr(); printf("\n\nSingle Room No %d Is Reserved",rno); printf("\n\nOccupant's Name : %s \n\nOccupant's NIC Number : \ %s \n\nCheck In Date : %s\n\nCheck Out Date : %s \n\n", \ guest.name[rno],guest.nic[rno],guest.rdate[rno],guest.cdate[rno]);
Check In Date\nO : Check Out Date\n\n"); mf=getch(); switch(mf) {//mf switch Begin case 'N': {//mf Case N Begin printf("\n\nEnter New Name\n"); gets(guest.name[rno]); getch(); mainm(); }//mf Case N End case 'I': {//mf Case I Begin printf("\n\nEnter New NIC Number\n"); gets(guest.nic[rno]); getch(); mainm(); }//mf Case I End case 'R': {//mf Case R Begin printf("\n\nEnter New Check In Date\n"); gets(guest.rdate[rno]); getch(); mainm(); }//mf Case R End case 'O': {//mf Case O Begin 26
printf("\n\nEnter New Check Out Date\n"); gets(guest.cdate[rno]); getch(); mainm(); }//mf Case O End default: {//mf Default Begin printf("\n\nInvalid Entry"); getch(); mainm(); }//mf Default End }//sr==1 if End } //rc Case S End else {// sr else begin printf("\n\nSingle Room No %d is Vacant",rno); getch(); mainm(); }//sr else end }//rc Case S End case 'D': {// rc Case D Begin if(dr[rno]==1) {//dr==1 if Begin clrscr(); printf("\n\nDouble Room No %d Is Reserved",rno); printf("\n\nOccupant's Name : %s \n\nOccupant's NIC Number : \ 27
printf("\n\nPress N : Change Of Name\nI : Change \ In NIC\nR : Check In Date\nO : Check Out Date\n\n"); mf=getch(); switch(mf) {//mf switch Begin case 'N': {//mf Case N Begin printf("\n\nEnter New Name\n"); gets(guest1.name[rno]); getch(); mainm(); }//mf Case N End case 'I': {//mf Case I Begin printf("\n\nEnter New NIC Number\n"); gets(guest1.nic[rno]); getch(); mainm(); }//mf Case I End case 'R': {//mf Case R Begin printf("\n\nEnter New Check In Date\n"); gets(guest1.rdate[rno]); 28
getch(); mainm(); }//mf Case R End case 'O': {//mf Case O Begin printf("\n\nEnter New Check Out Date\n"); gets(guest1.cdate[rno]); getch(); mainm(); }//mf Case O End default: {//mf Default Begin printf("\n\nIllegal Choice or make sure CAPS Lock is on"); getch(); mainm(); }//mf Default End }//dr==1 if End }//rc Case D End else {// dr else begin printf("\n\nSingle Room No %d is Vacant",rno); getch(); mainm(); }//dr else end } // Case D End default: {// rc Default Begin 29
printf("\n\n\nIllegal Entry Or Make Sure CAPS Lock is On"); getch(); mainm(); } // rc Default End } //Switch rc End } // Limit Else Falsified End } //Modify Function End
//Delete Function void delet(void) {//Delete Function clrscr(); printf("Enter The Room Number To Vacate\n"); gets(temp); rno=atoi(temp);
// Room Number Limit Check if(rno<1 || rno >51) {//IF Condition Begin printf("\n\nIllegal Room Number"); getch(); mainm(); } //IF Condition End else {// Room Number Limit Falsified Else printf("\n\nSingle Or Double Room? (S/D)"); 30
rc=getch(); switch(rc) {//rc Switch Begin case 'S': {//rc Case S Begin sr[rno]=0; printf("\n\nRoom Vacated"); printf("\n\nPress Any Key To Exit To The Main Menu"); getch(); mainm(); }// rc Case S End case 'D': {//rc Case D Begin dr[rno]=0; printf("\n\nRoom Vacated"); printf("\n\nPress Any Key To Exit To The Main Menu"); getch(); mainm(); }//rc Case D End default: {//rc Default Begin printf("\n\nIllegal Choice Or Make Sure CAPS Lock is ON"); getch(); mainm(); }// rc Default End }// rc Switch End }// Room Number Falsified Else End 31
// END OF PROGRAM
Welcome Page Data Flow Chart Options Page Data Flow Chart Data Entry Page (Booking) Data Flow Chart View Page Data Flow Chart Detail Modification Page Data Flow Chart Deletion Page Data Flow Chart
32
Welcome Page
Welcome Page displays the Detail of Project and Developer. Below is the flow chart of Welcome page which define the working of front page coding.
33
Welcome Page Function End Out Put Screen of Welcome Window is as Shown Below.
34
Options Page
This page displays the main Option of Project, Below is the flow chart of Option page.
35
Function displayed the Main Option of the Program and requires the user Choice to perform the dedicated task.
When User Press the corresponding Keys for the desired action, function switched to that mode
If User Selected R
If User Selected M
If User Selected D
If User Selected Q
If user choice is not matched, function displayed the default page Illegal Choice or make sure CAPS Lock is on.
If user select the any other key the given below error message displays and instruct the user to check the whether the Caps lock is ON or not, because the selection is case sensitive.
38
Once User Press the R key in CAPS Lock ON mode, Program enter in to the Data Entry function Mode.
Data Entry Page displays the option to store the customer information in Static Data Base.
Choice End
function displayed the default page Illegal Choice or make sure CAPS Lock is on.
40
When program enter in the Data Entry Mode Given Below Screen Displays which require the confirmation for room Booking,
41
If user confirmed the Room Booking, Function displays the Choice for Single Room or Double Room, else function return on Option Page for the choice Selection.
42
When User selects the choice of Single Room or Double Room, Function displays the corresponding Vacant Room for the booking, Then Information of Guest is filled by user in a sequential mode, i.e. Guest Name Guest NIC No. Guest Check in Date Guest Check out Date
43
After filling up above detail function again displays the Option for another booking, if user select the Y then function again displays the Booking confirmation option.
When user select the Double Room for booking, Same Option are displayed to user for the Room Booking,
44
And if User select the No, Function return on the main option window.
This function allows the user to check the availability of Vacant Room and Booking detail of Booked Room, in Sequential and Manual mode.
Choic e End
Function displayed the default page Illegal Choice or make sure CAPS Lock is on. View Room Status Function End
When User Select the V in Caps lock on Mode, Function Displays the Below option to user for Selcting the display of Room status in Sequential mode or Manual Mode, 46
If User Select the Sequential Mode then function displays the Room Status for single Room, with all data field in Header I.e. Room No. Name 47
After that function halt in Pause mode and ask for selecting the user to press any key to display the Double room Status, this Pause Mode facilitates the user to check the complete detail and user can view that screen till his choice. When user Press any key to move the function in Double room status mode, below mentioned Window is displayed
48
User can check the room status in Manual mode also, for that user need to select the R in Caps Lock Mode, when user Select R, below mentioned Message is displayed.
49
When user Enter the Room No. function displays the detail of corresponding Room No.
50
51
Choice End
52
When User Enter the Room No, Function validate the Room No, if Room Exist function displayed the choice for the Single room or Double room, else function displayed the illegal Room No. message and Exit from the modification Module.
53
When User Enter the correct Room No, below mentioned message is displayed. and user required to select the type of Room,
If User Select the Single Room type, then corresponding Room No, detail is displayed, and user Required to Press the desired key for the change in guest detail as per on screen instruction, i.e. N for Change in Name I for Change in NIC No. 54
User can update the Detail of Guest by selecting the desired Key. If User selected the any other Key, the Function displays the Error Message Invalid Entry
55
User can check the updated detail by selecting the View mode as displayed below.
56
This function allow user to delete the booking of any booked Room.
Delete Function start
Validatio n
Data Deleted
Default
Choice End
When User Select the D in Option Window, below mentioned message is displayed on the Screen and ask the user to enter the room no which needs to be Vacate. 58
When user enter the room No. function validated the Room No. and if Room no. does not exist in Hotel Database, Function displays the message Illegal Room No.
59
If Room No. Exist in Hotel Database, Function Asked the user to enter the type of room.
When user enters the type of room all detail of that room is erased from the data base and function displayed the message Room Vacated and ask user to Press any key to Exit from the Deletion Mode and back to Main Menu. 60
61
Definitions:
Verification: Are we building the product right? (i.e. does it meet the requirements
specification?)
Validation: Are we building the right product? (i.e. does the requirement specification
describe what the customer wants?
We check at each stage of the process using documents produced during previous stage. We do it early to catch problems early.
Static: Analysis and checking of documents (including source code). Performed at all stages of
the process.
Dynamic: Exercise the implementation (testing"). Obviously only performed when executable available (this might be prototype). Neither is sufficient by itself. Dynamic testing is the "traditional" approach, but static techniques are becoming more sophisticated.
62
We have tested each module separately i.e. have completed unit testing first and system testing was done after combining all different Modules with different menus and thorough testing was done. Testing is a very important part of SDLC (Software Development Life Cycle) and takes approximately 50%of the time.
SYSTEM TESTING: Testing: Testing involves executing the program (or part of it) using sample data and inferring from the output whether the software performs correctly or not. This can be done either during module development (unit testing) or when several modules are combined (system testing). Defect Testing: Defect testing is testing for situation where the program does not meet its fictional specification. Performance testing tests a system's performance or reliability under realistic loads. This may go some way to ensuring that the program meets its non-functional requirements. Debugging: Debugging is a cycle of detection, location, repair and test. Debugging is a hypothesis testing process. When a bug is detected, the tester must form a hypothesis about the cause and location of the bug. Further examination of the execution of the program (possible including many returns of it) will usually take place to confirm the hypothesis. If the hypothesis is demonstrated to be incorrect, a new hypothesis must be formed. Debugging tools that show the state of the program are useful for this, but inserting print statements is often the only approach. Experienced debuggers use their knowledge of common and/or obscure bugs to facilitate the hypothesis testing process. After fixing a bug, the system must be reset to ensure
63
that the fix has worked and that no other bugs have been introduced. This is called regression testing. In principle, all tests should be performed again but this is often too expensive to do.
64
TEST PLANNING:
Testing needs to be planned to be cost and time effective. Planning is setting out standards for tests. Test plans set out the context in which individual engineers can place their own work. Typical test plan contains:
>Schedule
>Constraints
Implementation
65
Implementation uses the design document to produce code. Demonstration that the program satisfies its specifications validates the code. Typically, sample runs of the program demonstrating the behavior for expected data values and boundary values are required.
Write/Compile/ Test
It may take several iterations of the model to produce a working program. As programs get more complicated, testing and debugging alone may not be enough to produce reliable code. Instead, we have to write programs in a manner that will help insure that errors are caught or avoided.
66
BIBLIOGRAPHY
C Programming by E. Balagurusamy (Tata McGraw-Hill) C Programming by Gottfried (Schaums Outline Series - Tata McGraw-Hill) Let Us C by Yeshwant Kanetkar (BPB Publications) www.Wikipedia.org
67