1
INDEX
Sl. No.
Table of contents
Page No.
1
TITLE OF THE PROJECT
4
2
INTRODUCTION OF THE PROJECT
6
3
OBJECTIVES OF THE PROJECT
4
PROJECT CATEGORY AND PLATFORM
9
5
TOOLS
10
6
HARDWARE REQUIREMENT SPECIFICATION
11
7
PROJECT DETAIL AND CODING
12-34
8
DATA FLOW DIAGRAM AND MODULE DISCRIPTION
35-63
9
VERIFICATION & VALIDATION
2
7-8
64
INDEX
Sl. No.
Table of contents
Page No.
1
TITLE OF THE PROJECT
4
2
INTRODUCTION OF THE PROJECT
6
3
OBJECTIVES OF THE PROJECT
4
PROJECT CATEGORY AND PLATFORM
9
5
TOOLS
10
6
HARDWARE REQUIREMENT SPECIFICATION
11
7
PROJECT DETAIL AND CODING
12-34
8
DATA FLOW DIAGRAM AND MODULE DISCRIPTION
35-63
9
VERIFICATION & VALIDATION
2
7-8
64
10
TESTING
65-68
11
BIBLIOGRAPHY
69
Introduction of the project
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 this Hotel Hotel Reserva Reservatio tion n Sysetem Sysetem project project some some featur feature e are facili facilitat tated. ed. This 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
3. View Room Status 4. Delete the Booking
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.
4
Main objective of the Proposed System
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
5
Project Category and Platform This program is a basic console based program ,in which static data base, stack and Queue LIFO,FIFO are used. It is a function based basic program.
Platform Microsoft Windows 9X/Me/XP
6
Tools I have used Turbo C as a basic basic programming language.The C programming language is a popular and widely used programming language for creating computer programs.C is a genera generall purpose purpose struc structur tured ed progra programmi mming ng langua language ge that that is powerf powerful, ul, effici efficient ent and compact. It was developed at AT &T’s Bell Laboratories of USA in 1972. It was designed and and writt written en by Denn Dennis is Ritc Ritchi hie. e. C was
an offs offspr prin ing g of
the the Basic Basic Camb Cambri ridg dge e
Programming Language (BCPL) called B.
Some Features of C/C++ are:1. It is is relia reliable ble , simple simple and and easy easy to to use. use. 2. Progra Programs ms in C are effic efficien ientt and fast.T fast.This his is due to vari variety ety of data data types types and and powerfu powerfull operators. 3. There are only only 32 keywords keywords and and its strength strength lies lies in its builtbuilt-in in functions functions.. 4. C helps helps in devel developi oping ng struct structure ured d program programs. s. 5. C is highly suitable suitable for for recursi recursive ve program programming. ming. 6. It is also also suitab suitable le for graph graphics ics prog program rammin ming. g. 7. C is is hig highl hly y por porta tabl ble. e. 8. It is highly suitable for writing both system software and business packages.
9. We can add add our own own functio functions ns to the the library library.. Therefo Therefore, re, impor importan tantt featur feature e of C is its ability to extend itself. 10. C is format format free language.No language.No line numbers numbers are needed.need needed.need not place statements statements on a specified location on a line. 7
11. Standard libraries for I\O, I\O, string manipulation, Arithmetic operations etc. etc. 12. Pointer Pointer implementation implementation is available 13. Bitwise Bitwise manipulation manipulation is possible. possible. 14. C stands between the assembly languages and the High High Level Languages.C has all the
advantages advantages of assembly assembly language and it has the significant significant features features of modern HLLs (High Level Languages).thats why it is often called a Middle Level Language.
8
Hardware Requirement Specification:-
Micro Processors
:
Pentium®II Processors
Processing Speed
:
550MHz
Random Access Memory (RAM)
:
128 MB
Secondary Storage
:
20 GB of Hard Disk
CD ROM
:
52X CD-ROM
Floppy Disk
:
1.44MB
File System
:
32bit
Virtual Memory
:
32MB
Operating System
:
Windows 9x/Me/XP
Project Detail
This Project contains 6 segments
9
Welcome Page
Options Page
Data Entry Page (Booking)
View Page
Detail Modification Page
Deletion Page
Welcome page displays the information regarding Project and Developer.
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.
View Page displays the status of Room and Guest Details.
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 #include #include #include #define size 51
void mainm(void); void entry(void); void modify(void); void delet(void); void view(void);
// Structure
struct hoteldata { char name[size][30], nic[size][20],rdate[size][12],cdate[size][12]; };
struct hoteldata guest;
11
struct hoteldata1 { char name[size][30], nic[size][20],rdate[size][12],cdate[size][12]; };
struct hoteldata1 guest1;
// Initializations
int li,lp,sr[size];int dr[size];int rno;int i;int e; char rc,ch,choice,echoice,rchoice,temp[80],vchoice,mf,ar;
// Main Fuction void main(void) { clrscr(); sr[0]=1;dr[0]=1; // THE MAIN LOGIC !!
for(li=10;li<71;li++) { gotoxy(li,15); delay(30); printf("\/"); } 12
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
//Main Menu Function void mainm(void) { clrscr(); for(li=30;li<=50;li++) { gotoxy(li,14); delay(30); 14
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
}//AR Default End
}// AR Switch End }// Single Room IF End }// Rchoice Case S End
case 'D': { //Rchoice Case D Begin for(i=1;i
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
mainm(); } // Echoice Default End } //Data Entry Function End
// 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
}//SR[i]==1 Conditional Printing End }//i Loop End 21
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
}//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", \
\n\nCheck In Date :
guest.name[rno],guest.nic[rno],guest.rdate[rno],guest.cdate[rno]);
}//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]);
printf("\n\nPress N : Change Of Name\nI : Change In NIC\nR : \ 25
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
%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 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
}// Delete Function End
// END OF PROGRAM
DATA FLOW DIAGRAM AND MODULE DISCRIPTION Hotel Reservation System contained 6 Data flow chart, which facilitates the end user to Complete the Day to day activities in Effective and faster way.
Below is the list of 6 Data flow function
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.
Welcome Page Logic
Function print upper Horizontal Line
Function print Lower Horizontal Line
Function print Right Vertical Line
33
Function print Left Vertical Line
Function displayed the Welcome window of Hotel reservation system
Function displayed the comment “Press any key to continue”.
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
Main Page Function start
Function print upper Horizontal Line
Function print Right Vertical Line
Function print Lower Horizontal line
Function print Left vertical line
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
A
Out Put Window 36
A
If User Selected “R”
Data Entry Page
37 If User Selected “V” View Status Page
If User Selected “M”
Data Modification Page
If User Selected “D”
Reservation cancelation
If User Selected “Q”
Exit from the System
If user choice is not matched, function displayed the default page “Illegal Choice or make sure CAPS Lock is on”.
Main Page Function End
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 (Booking) 39
Data Entry Page displays the option to store the customer information in Static Data Base.
Data Entry Function Start
Room booking confirmation message displayed
N
Choice (Y/N) Y Choice (S/D)
S
D
Detail of Guest to be filled
Detail of Guest to be filled
Choice End
function displayed the default page “Illegal Choice or make sure CAPS Lock is on”.
Data Entry Function End
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.
View Page Data Flow Chart 45
This function allows the user to check the availability of Vacant Room and Booking detail of Booked Room, in Sequential and Manual mode.
View Room Status Function start
R
S
Function print Header
Choice (Enter Room No.)
Data Extraction for Single Room
Data Extraction for Single and Double Room
Pause” Press any key to continue
Data Extraction for Double Room
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
NIC No. Check in DATE Check out Date
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
Modification Page Flow Chart This Page displays the option to modify the detail of booked room.
Modification Function start
Header (Room No. Entry)
Validati on Wrong Room No.
Room Exist
Function to Modify Room Detail
Choice End
Modification Function End
52
Function required the Room No to modify the detail,
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
R for Change in Check in Date O for Check out Date
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
Deletion Page Flow Chart 57
This function allow user to delete the booking of any booked Room. Delete Function start
Header (Enter Room No,)
Validatio n
Room Exist
Wrong Room No.
Choice (S / D)
Data Deleted
Default
Choice End
Delete Function 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
Verification & Validation
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.
Two types of Validation & Verification:
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
TESTING (Testing Techniques and Testing Strategies)
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:
>Overview of testing process.
>Requirements traceability ( to ensure that all requirements are tested)
>List of item to be tested
>Schedule
>Recording procedures so that test results can be audited
>Hardware and software requirements
>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.
Small programs are written using the model:
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