CURRENT SYSTEM


The name of the company that I am discussing about its system is <company name snipped> All the system running in various departments are computerized except that of the Front Office which needs to do some revamping in its system. Everyday the counter will handle the checking in and out of the guests and that includes issuing of statement account to the guests, doing daily room sales report and making reservation of rooms for the guests.

The major disadvantage about their system is the room reservation. Currently, the receptionists are using the paper room reservation chart to take down room reservations for the guest. For example, when the guest wants to book a room, the receptionist will shade the respective column in pencil indicating that the room has been blocked for the guest on which date and departing on which date. This is extremely inconvenient and prone to errors.

Firstly, all the bookings are marked in pencils; they could be accidentally erased by other staffs. Secondly, the booking might be done incorrectly, for example the room must be blocked on the 11th however the staff might accidentally mark it on the 12th, and problems will arise when all the rooms are fully booked on the 11th as the guest will turn up on the 11th for his room. The reservation chart will look untidy and unclear for reference as to which rooms are available on which dates with all the shadings here and there the chances of rooms overbooked are high. When the guest wants to cancel the room booking, the staff will have to erase the room blocked for him; this is extremely not workable as constant erasure will cause the paper to tear.


PROPOSED NEW SYSTEM

Right now, we will have to go into how we can improve the room reservation system. Basically, the company has only 20 standard rooms as it is a club. We can convert the chart into a computerized system so that it is more readable, tidier, and easier to do the erasure of the booking and the chances of rooms being overbooked are minimal or even none. The computerized room reservation system will proved to be efficient when checking for the availability of rooms for the guest. At one glance, the staffs will be clear as to which rooms are available on which dates and just by choosing the Search List options, the user can view the list of the names of the guests and other details of the guests. The program consists of 5 modules, namely Add, Search, List, Delete and Quit. The user will select the respective choice for the input of the data or choose Quit to exit the program.

The Add module in the program is used to enter a new booking from the guest. When the Add module is selected, the screen under the add module will prompt the users to enter the check-in, departure dates and the number of rooms the guest wants, upon pressing the enter key, the system will check for the availability of rooms in the requested range of dates and whether the range of dates has got the number of rooms the guest wants. When there are rooms available, the system will pop up a message to confirm with the user whether the room will be blocked. If it is confirmed, then enter ‘Y’ otherwise enter ‘N’. If ‘Y’ is entered, the system will prompt the user to enter the name of the guest, passport number and the flight details which will be further explained later as to what are the things to enter in the flight details. If the user chooses ‘N’ then the user will have to enter the particulars again. After all particulars have been entered, then upon hitting the Enter key, a message pops up again to ask the user whether to save the entry for the guest’s particulars. If entered ‘Y’, the entry is saved, else if entered ‘N’, the system will go back to the main menu where the user can choose other options. The room is automatically blocked for the guest according to the range of dates entered by shading the rows and columns, the system will display a room number at the bottom of the module. The range of room numbers is from 1 – 20.

The Search module is for editing purposes like changing of the particulars of the guests and also for the reference to the staffs as they would like to check for the flight details of the guests. When the search module is selected, the screen will prompt the user to enter the name of the guest, the system will locate that booking. After the booking is located, the system will pop up a message to ask the user whether to change the information. If enter ‘Y’, the user will have to reenter the particulars. If it is entered ‘N’, then the system will return to the main menu.

After reentering all the particulars of the guest, the screen will pop up a message to confirm whether to replace the information. If entered ‘Y’, the information is replaced and saved. If entered ‘N’, the system will return to the main menu.

The List module is helpful for the user if he/she wants to view the names of guests, the check-in and out dates. When the List module is selected, the screen will show a list of the above mentioned data. The user can hit the Enter key if he wants to exit to the main menu.

The Delete module is meant for any cancellation of bookings. When the delete module is selected, the system will prompt the user to enter the name of the guest. After the booking is located, the system will pop up a message to confirm with the user whether he wants to delete the booking. If it is confirmed to delete the booking, the user will enter ‘Y’ otherwise enter ‘N’. If the latter is chosen, it will return to the main menu for other options.


Specification- Processing and Validations

1. Dates
ü The range of dates to be entered is from 01 – 31, the range of months to be entered is from 01 – 12 and the range of years to be entered is from 2000 – 2500, the format entry is dd/mm/yyyy, e.g.01/02/2000. The entry for the year is 4 characters.
ü If the entry does not fulfil the above mentioned, then error messages will pop up:
I. “Enter day range from 1 to 31 only.”
II. “Enter month range from 1 to 12 only.”
III. “Invalid day entered for the month.”
IV. “Enter year range from 2000 – 2500.”

2. Choices
ü The acceptable entry for the choices is from 1 – 5. If entry is not within the range, then error message pops up “Not within the range! Please enter again.”

3. Name of the guest
ü The acceptable entry for the name is purely alphabets (a – z and A – Z). Otherwise display error message “Accept only letters of alphabets.”
ü The maximum number of characters entered is 20. If the entry exceeds 20 characters, then display error message “Exceeds maximum characters.”

4. Passport number
ü The maximum number of characters to be entered is 15, therefore if the user enters more than 15 characters, then the system will show error message “Exceeds maximum characters.”
ü The entry for this data item can be anything.


5. Time
ü The format entry for the time is from 0000 – 2400 and the number of characters to be entered is 4.
ü If the entry does not fulfil the format, then display error message “ Invalid entry.”
ü As the entry for the time involves only numbers, therefore if the user enters any letters then, error message pops up “Accept only numbers!”

6. Flight number
ü The entry for the flight number can be anything and the maximum number of characters to be entered is 6.
ü If the user’s entry exceeds more than 6 characters, error message will pop up “Exceeds maximum characters.”

7. Number of rooms

ü The acceptable range of entry for this data item is from 1 – 20. The number of characters to be entered is 2.
ü If the entry is not within the range, error message “Invalid entry!” will be displayed.


Messages used in the program

v Add module
Ø Confirm to reserve the rooms (Y/N)? _
Ø Save the data (Y/N)? _

v Search module
Ø Change the current data (Y/N)? _
Ø Replace the data (Y/N)? _
Ø When the name entered is not found in the file, the system will show error messages “Record does not exist” followed by “Press any key to proceed”

v List module
Ø After viewing the information under the List module, the system will have the message “Press any key to proceed.”
v Delete module
Ø Delete the booking (Y/N)? _
Ø As keying in the name of the guest retrieves the record to be deleted, therefore if the record is not found in the file, then error message pops up “Record does not exist.”
Specification – File Specification

No.
Item Name
Description
Data Type
Size

Range
1.
DD_In
Guest check in day
Int
-
1 - 31
2.
MM_In
Guest check in month
Int
-
1 – 12
3.
YY_In
Guest check in year
Int
-
-
4.
DD_Out
Guest check out day
Int
-
1 - 31
5.
MM_In
Guest check out month
Int
-
1 – 12
6.
Name
Guest name
Char
30
A – Z
7.
Pass
Guest passport number
Char
15
-
8.
FL_No
Guest filght number
Char
10
-
9.
TM_FL
Guest time of flight
Char
5
-
10.
ES_AR
Estimated time arrival
Char
5
-
11.
No_RM
Number of rooms
Int
-
1 - 99


Specification – Screen Design
MENU


1. Add
2. Search
3. List
4. Delete
5. Quit

New Reservation


Check-in-date(dd/mm/yyyy): 99/99/9999
Check-out-date(dd/mm/yyyy): 99/99/9999
Number of rooms(1-20): 99

Name of guest (max20): xxxxxxxxxxxxxxxxxxxx
Passport number (max15): xxxxxxxxxxxxxxx
Flight number (max6): xxxxxx
Time of flight(0000-2400): 9999
Estimated time arrival: 9999

Edit Reservation


Check-in-date(dd/mm/yyyy): 99/99/9999
Check-out-date(dd/mm/yyyy): 99/99/9999
Number of rooms(1-20): 99

Name of guest (max20): xxxxxxxxxxxxxxxxxxxx
Passport number (max15): xxxxxxxxxxxxxxx
Flight number (max6): xxxxxx
Time of flight(0000-2400): 9999
Estimated time arrival: 9999

1.Name 2.Passport number 3.Flight number 4.Time of flight
5.Arrival time 6.Number of rooms 0.Quit

Change the current data(Y/N)? _

Listing of Guests’ names


Name of guest Passport number Check-in-date Check-out-date

xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx 99/99/9999 99/99/9999
xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx 99/99/9999 99/99/9999
xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx 99/99/9999 99/99/9999
xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx 99/99/9999 99/99/9999
xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx 99/99/9999 99/99/9999
xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx 99/99/9999 99/99/9999
xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx 99/99/9999 99/99/9999
xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx 99/99/9999 99/99/9999
xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx 99/99/9999 99/99/9999


Delete Reservation


Check-in-date(dd/mm/yyyy): 99/99/9999
Check-out-date(dd/mm/yyyy): 99/99/9999
Number of rooms(1-20): 99

Name of guest (max20): xxxxxxxxxxxxxxxxxxxx
Passport number (max15): xxxxxxxxxxxxxxx
Flight number (max6): xxxxxx
Time of flight(0000-2400): 9999
Estimated time arrival: 9999







Testing – Test Plan

Test Cases

Objectives
Case 1

To check for the correct entry range of the options in the main menu.

Case 2

To check that the range of entry for the number of rooms is from 1 – 20.
Case 3

To check that only alphabets are accepted when entry the name of guest.
Case 4

To check that the number of characters entered for the name does not exceed 20.
Case 5

To check that the number of characters entered for the passport number does not exceed 15.
Case 6

To check that the number of characters entered for the flight number does not exceed 6.
Case 7

To check that only numbers are accepted for time.
Case 8

To check that the number of characters entered for time is 4. No more or less than 4.
Case 9

To check that the range of entry for days is from 1 to 31.
Case 10

To check that the entry for the month is from 1 to 12.
Case 11

To check that the range of entry for the year is from 2000-2500.
Case 12

To check for the validity of the entry for days in a particular month.
Case 13

To ensure that the program prompt the user when the name keyed in is not found in the file.
Case 14

To check that when the user enters 1 in the main menu, it goes to the ‘New Reservation’ screen.
Case 15

To check that when the user enters 2 in the main menu, it goes to the ‘Edit Reservation’ screen.
Case 16

To check that when the user enters 3 in the main menu, it goes to the ‘Listing’ screen.
Case 17

To check that when the user enters 4 in the main menu, it goes to the ‘Deleting Reservation’ screen.
Case 18

To check that the program displays the details of a record when it is found under the Search screen.
Case 19

To check that under the List module, the program prompts the user to press any key to proceed.
Case 20

In the Add module, to check that after entering the check-in and out dates and the number of rooms, the program prompts the user of the confirmation to reserve the room.
Case 21

To check that after the entry of the data, the program will prompt the user whether to save the data.
Case 22

In the Search module, to check that the program prompts the user whether to make any changes to the data when it is displayed on the screen.
Case 23

In the Search module, to check that the program prompts the user to replace the data after amendments.
Case 24

In the Delete module, to check that when the targeted record is found, the program will prompt the user whether to delete the record.

Testing – Test Plan
Test cases

Objectives
Case 25

To check that the cursor moves to the ‘Name of guest’ when option 1 is chosen.
Case 26

To check that the cursor moves to the ‘Passport number’ when option 2 is chosen.
Case 27

To check that the cursor moves to the ‘Flight number’ when option 3 is chosen.
Case 28

To check that the cursor moves to the ‘Time of flight’ when option 4 is chosen.
Case 29

To check that the cursor moves to the ‘Estimated time arrival when option 5 is chosen.
Case 30

To check that the cursor moves to the Number of rooms when option 6 is chosen.




Testing – Test cases


Test case : 1

Objectives : To check for the correct entry of the options in the main menu.
Test Data : Enter the number 6 to test.
Expected Test Result : If the number 6 is entered, as it is not within the range of 1 to 5, therefore the screen will display error message “Not within the range! Pls. enter again.”
Actual Test Result : As below.
Conclusion : Succeeded. Error message was displayed when the test data was entered.


Test case : 2

Objectives : To check that the range of entry for the number of rooms is from 1 to 20.
Test Data : 21
Expected Test Result : To show the error message “Invalid entry!”
Actual Test Result : As below.
Conclusion : Succeeded. Displays error message when the test data is entered.


Test case : 3

Objectives : To check that only alphabets are accepted when entering the name of the guest.
Test Data : 20
Expected Test Result : To show the error message “Accept only letters of alphabets ”
Actual Test Result : As shown below.
Conclusion : Succeeded. Error message was displayed on the screen.


Test case : 4
Objectives : To check that the number of characters entered for the name does not exceed 20.
Test Data : Using 21 ‘A’s.
Expected Test Result : The screen should show error message “Exceeds maximum characters!”
Actual Test Result : As shown below.
Conclusion : Succeeded. The error message was shown on the screen.

Test case : 5
Objectives : To check that the number of characters entered for the Passport number does not exceed 15.
Test Data : 16 characters. 8 ‘B’s and 8 ‘9’s.
Expected Test Result : The screen should show error message “Exceeds maximum characters!”
Actual Test Result : As shown below
Conclusion : Succeeded. The error message was displayed on the screen as expected.


Test case : 6
Objectives : To check that the number of characters entered for the flight number does not exceed 6.
Test Data : 3 ‘A’s and 4 ‘1’s.
Expected Test Result: The screen should show the error message “Exceeds maximum characters!” when the test data is entered.
Actual Test Result : As shown below.
Conclusion : Succeeded. The error message was displayed on the screen as expected.


Test case : 7
Objectives : To check that only numbers are accepted for time.
Test Data : kkkk.
Expected Test Result : The screen should show the error message “Accept only numbers!” when the test data is entered.
Actual Test Result : As shown below.
Conclusion : Succeeded. The error message was displayed on the screen as expected.

Test case : 8
Objectives : To check that the number of characters entered for time is only 4 characters, no more than 4 or less than 4 characters.
Test Data : 22000.
Expected Test Result : The screen should show the error message “Invalid entry!” when the test data is entered.
Actual Test Result : As shown below.
Conclusion : Succeeded. The error message was displayed on the screen as expected.


Test case : 9
Objectives : To check that the range of entry for days is from 1 to 31 only.
Test Data : 32.
Expected Test Result : The screen should show the error message “Enter date range from 1 to 31 only” when the test data is entered.
Actual Test Result : As shown below.
Conclusion : Succeeded. The error message was displayed on the screen as expected.

Test case : 10
Objectives : To check that the range of entry for month is from 1 to 12 only.
Test Data : 13.
Expected Test Result : The screen should show the error message “Enter month range from 1 to 12 only” when the test data is entered.
Actual Test Result : As shown below.
Conclusion : Succeeded. The error message was displayed on the screen as expected.

Test case : 11
Objectives : To check that the range of entry for year is from 2000 to 2500.
Test Data : 2501.
Expected Test Result : The screen should show the error message “Enter year range from 2000 to 2500 only” when the test data is entered.
Actual Test Result : As shown below.
Conclusion : Succeeded. The error message was displayed on the screen as expected.

Test case : 12
Objectives : To check for the validity of the entry of days in a particular month.
Test Data : 29.
Expected Test Result : The screen should show the error message “Invalid day entered for the month” when the test data is entered.
Actual Test Result : As shown below.
Conclusion : Succeeded. The error message was displayed on the screen as expected.


Test case : 13
Objectives : To ensure that the program prompt the user when the name keyed in is not found in the file.
Test Data : KKK.
Expected Test Result : The screen should show the message “Record does not exist!” when the test data is entered.
Actual Test Result : As shown below.
Conclusion : Succeeded. The message was displayed on the screen as expected.

Test case : 14
Objectives : To check that when the user enters 1 in the main menu, it goes to the ‘New Reservation’ screen .
Test Data : 1.
Expected Test Result : The screen should show the ‘New Reservation’ screen with all the data items on the screen.
Actual Test Result : As shown below.
Conclusion : Succeeded. The screen has displayed the expected result.

Test case : 15
Objectives : To check that when the user enters 2 in the main menu, it goes to the ‘Edit Reservation’ screen .
Test Data : 2.
Expected Test Result : The screen should show the ‘Edit Reservation’ screen with all the data items on the screen.
Actual Test Result : As shown below.
Conclusion : Succeeded. The screen has displayed the expected result.


Test case : 16
Objectives : To check that when the user enters 3 in the main menu, it goes to the ‘Listing of Guests’ names’ screen .
Test Data : 3.
Expected Test Result : The screen should show the ‘Listing of Guests’ names’ screen.
Actual Test Result : As shown below.
Conclusion : Succeeded. The screen has displayed the expected result.


Test case : 17
Objectives : To check that when the user enters 4 in the main menu, it goes to the ‘Deleting Reservation’ screen .
Test Data : 4.
Expected Test Result : The screen should show the ‘Deleting Reservation’ screen.
Actual Test Result : As shown below.
Conclusion : Succeeded. The screen has displayed the expected result.


Test case : 18
Objectives : To check that the program displays the details of a record when it is found under the Search screen.
Test Data : CANDY CHEE.
Expected Test Result : The screen should show the details of all data that was entered and saved in the Add screen and displays it in the Search screen when the test data is entered
Actual Test Result : As shown below.
Conclusion : Succeeded. The screen has displayed the expected result.

Test case : 19
Objectives : To check that the program prompts the user to press any key to proceed under the List screen.
Test Data : 3.
Expected Test Result : The screen should show the message “Press any key to proceed...”
Actual Test Result : As shown below.
Conclusion : Succeeded. The screen has displayed the expected result.

Test case : 20
Objectives : In the Add module, to check that after entering the Check-in and out dates and the number of rooms, the program will prompt the user of the confirmation to reserve the room.
Test Data : 03/03/2000, 04/03/2000 and 2.
Expected Test Result : The screen should show the message “Confirm to reserve the room(Y/N)? _”
Actual Test Result : As shown below.
Conclusion : Succeeded. The screen has displayed the expected result.


Test case : 21
Objectives : In the Add module, to check that after the entry of all the data , the program will prompt the user whether to save the data
Test Data : 03/03/2000, 04/03/2000, 2, CANDY CHEE, 8106899B, 123456, 0330 and 0530.
Expected Test Result : The screen should show the message “Save the data(Y/N)? _”
Actual Test Result : As shown below.
Conclusion : Succeeded. The screen has displayed the expected result.


Test case : 22
Objectives : In the Search module, to check that the program prompts the user whether to make any changes to the data when it is displayed on the screen
Test Data : CANDY CHEE
Expected Test Result : The screen should show the message “Change the current data(Y/N)?_”
Actual Test Result : As shown below.
Conclusion : Succeeded. The screen has displayed the expected result.


Test case : 23
Objectives : In the Search module, to check that the program prompts the user whether to replace the data after amendments
Test Data :
Expected Test Result : The screen should show the message “Replace the data(Y/N)?_”
Actual Test Result : As shown below.
Conclusion : Succeeded. The screen has displayed the expected result.

Test case : 24
Objectives : In the Delete module, to check that when the target record is found, the program will prompt the user whether to delete the record.
Test Data : CANDY CHEE
Expected Test Result : The screen should show the message “Delete the booking(Y/N)?_”
Actual Test Result : As shown below.
Conclusion : Succeeded. The screen has displayed the expected result.

Test case : 25
Objectives : To check that the cursor moves to the ‘Name of guest’ when option 1 is chosen..
Test Data : 1
Expected Test Result : The cursor under the Search module will move to the ‘Name of guest ‘when 1 is chosen
Actual Test Result : As shown below.
Conclusion : Succeeded. The screen has displayed the expected result.

Test case : 26
Objectives : To check that the cursor moves to the ‘Passport number’ when option 2 is chosen..
Test Data : 2
Expected Test Result : The cursor under the Search module will move to the ‘Passport number ‘when 2 is chosen
Actual Test Result : As shown below.
Conclusion : Succeeded. The screen has displayed the expected result.


Test case : 27
Objectives : To check that the cursor moves to the ‘Flight number’ when option 3 is chosen..
Test Data : 3
Expected Test Result : The cursor under the Search module will move to the ‘Flight number ‘when 3 is chosen
Actual Test Result : As shown below.
Conclusion : Succeeded. The screen has displayed the expected result.


Test case : 28
Objectives : To check that the cursor moves to the ‘Time of flight’ when option 4 is chosen..
Test Data : 4
Expected Test Result : The cursor under the Search module will move to the ‘Time of flight’ when 4 is chosen
Actual Test Result : As shown below.
Conclusion : Succeeded. The screen has displayed the expected result.


Test case : 29
Objectives : To check that the cursor moves to the ‘Estimated time arrival’ when option 5 is chosen..
Test Data : 5
Expected Test Result : The cursor under the Search module will move to the ‘Estimated time arrival’ when 5 is chosen
Actual Test Result : As shown below.
Conclusion : Succeeded. The screen has displayed the expected result.

Test case : 30
Objectives : To check that the cursor moves to the ‘Number of rooms’ when option 6 is chosen..
Test Data : 6
Expected Test Result : The cursor under the Search module will move to the ‘Number of rooms’ when 6 is chosen
Actual Test Result : As shown below.
Conclusion : Succeeded. The screen has displayed the expected result.

Testing – Test Log

Test Cases
Status
Case 1
Successful
Case 2
Successful
Case 3
Successful
Case 4
Successful
Case 5
Successful
Case 6
Successful
Case 7
Successful
Case 8
Successful
Case 9
Successful
Case 10
Successful
Case 11
Successful
Case 12
Successful
Case 13
Successful
Case 14
Successful
Case 15
Successful
Case 16
Successful
Case 17
Successful
Case 18
Successful
Case 19
Successful
Case 20
Successful
Case 21
Successful
Case 22
Successful
Case 23
Successful
Case 24
Successful
Case 25
Successful
Case 26
Successful
Case 27
Successful

Testing – Test Log

Test Cases
Status
Case 28
Successful
Case 29
Successful
Case 30
Successful


Program Design – Pseudocode Code
Main

DO

CALL Menu Screen
CALL Select
ENDDO

Module Menu Screen

DO
DISPLAY options

ENDDO

Module Select

DO
CALL Menu Screen
DO WHILE choice not equal to 5
GET choice
DO CASE
Choice 1
DO
CALL Add
ENDDO
Choice 2
DO
CALL Search
ENDDO
Choice 3
DO
CALL List
ENDDO


Choice 4
DO
CALL Delete
ENDDO
Choice 5
Exit
OTHERWISE
DO
DISPLAY “Not within the range! Pls enter again.”
ENDDO
ENDCASE
ENDDO
ENDDO

Module Add
DO
REPEAT UNTIL input is valid
DO
CALL Show Screen
CALL Input Date
CALL Input Date 2
CALL Input Value for Number of rooms
CALL Ask Message 1

IF reply equal ‘Y’ THEN
DO
CALL Input String for Name of guest
CALL Input String for Passport number
CALL Input String for Flight number
CALL Input String 2 for Time of flight
CALL Input String 2 for Estimated time arrival
ENDDO
ENDIF
ENDDO
CALL Ask message 2
IF reply is equal ‘Y’ THEN
DO
OPEN Reservation file in append mode
CALL Write File
CLOSE Reservation file
ENDDO
ENDIF
ENDDO

Module Show Screen
DO
DISPLAY “Check-in-date(dd/mm/yyyy)”
DISPLAY “Check-out-date(dd/mm/yyyy)”
DISPLAY “Number of rooms(1-20)”
DISPLAY “Name of guest(max20)”
DISPLAY “Passport number(max15)”
DISPLAY “Flight number (max6)”
DISPLAY “Time of flight (0000-2400)”
DISPLAY “Estimated time arrival”
ENDDO
Module Display Details

DO

CALL Show Screen
DISPLAY details
ENDDO

Module Input String

DO

REPEAT UNTIL input is valid
DO
ACCEPT entry
CALL Validate String Size
IF size is valid AND entries are all alphabets THEN
DO
CALL Validate String Entries
ENDDO
ENDIF
IF entries are all alphabets THEN
DO
CALL Capitalise String
ENDDO
ENDIF
ENDDO
ENDDO



Module Input String 2

DO

REPEAT UNTIL input is valid
DO
ACCEPT entry
CALL Validate String Size 2
IF size is valid THEN
DO
CALL Validate String Entries 2
ENDDO
ENDIF
ENDDO
ENDDO

Module Input Value

DO

REPEAT UNTIL entry is valid
DO
ACCEPT value entry
CALL Validate Range
IF entry is invalid THEN
DO
CALL Error Message
ENDDO
ENDDO
ENDDO



Module Input Date

DO
REPEAT UNTIL entry is valid
DO
ACCEPT value entry
CALL Validate Range
IF entry is valid THEN
DO
CALL Error Message 2
ENDDO
ELSE
DO
CALL Validate Range
ENDDO
IF entry is valid
DO
CALL Error Message 1
ENDDO
ELSE
DO
CALL Validate Date
ENDDO
IF entry is valid
DO
CALL Error Message 3
ENDDO
ELSE
DO
CALL Validate Range
ENDDO
IF entry is valid
DO
CALL Error message 4
ENDDO
ENDIF
ENDIF
ENDIF
ENDIF
ENDDO

Module Input Date 2

DO
REPEAT UNTIL entry is valid
DO
ACCEPT value entry
CALL Validate Range
IF entry is invalid THEN
DO
CALL Error Message 2
ENDDO
ELSE
DO
CALL Validate Range
ENDDO
IF entry is invalid
DO
CALL Error Message 1
ENDDO
ELSE
DO
CALL Validate Date
ENDDO
IF entry is invalid
DO
CALL Error Message 3
ENDDO
ELSE
DO
CALL Validate Range
ENDDO
IF entry is invalid
DO
CALL Error message 4
ENDDO
ENDIF
ENDIF
ENDIF
ENDIF
ENDDO

Module Validate String Size

DO
IF the length of the string is greater than size
DO
CALL Error Message
ENDDO
ENDIF
ENDDO

Module Validate String Size 2

DO
IF the length of the string is greater than OR less than size
DO
CALL Error Message
ENDDO
ENDIF
ENDDO


Module Validate String
DO
DO WHILE not end of string
IF entry is not alphabets AND string position is not equal to space THEN
DO
CALL Error Message
ENDDO
ELSE
DO
SET increase position by one
ENDDO
ENDIF
ENDDO
ENDDO

Module Validate String 2
DO

DO WHILE not end of string
IF entry is not digits AND string position is not equal to space THEN
DO
CALL Error Message
ENDDO
ELSE
DO
SET Increase position by one
ENDDO
ENDIF
ENDDO
ENDDO



Module Capitalise String
DO

DO WHILE not end of string
IF the first character of the string is equal to space THEN
DO
SET position of the string to capital letter
SET increase position by one
ENDDO
ENDIF
ENDDO
ENDDO

Module Validate Range
DO

IF the value entered is smaller than minimum OR more than maximum THEN
DO
SET Validate Range to FALSE
ENDDO
ELSE
DO
SET Validate Range to TRUE
ENDDO
ENDIF
ENDDO



Module Validate Date
DO

IF the month is equal to 4 OR equal to 6 OR equal to 9 OR equal to 11 AND the data is greater than 30 THEN
DO
SET Validate Date to FALSE
ENDDO
ELSE
IF the month is equal to 2 AND the date is greater than 28 THEN
DO
SET Validate Date to FALSE
ENDDO
ELSE
DO
SET Validate Date to TRUE
ENDDO
ENDIF
ENDIF
ENDDO

Module Search
DO

CALL open temp file
CALL Show Screen
CALL Input String for target record
SET status entry to Open File
IF status entry is equal to ‘S’
DO WHILE not end of file

DO
CALL Read File
ENDDO
IF name is matched with the target record THEN

DO
IF not end of file THEN
DO
CALL Write File
ENDDO
ENDIF
ENDDO
ELSE
IF not end of file THEN
DO
SET mode to 0
CALL Display Details
CALL Ask Message 1
IF reply equal ‘Y’ THEN
DO
CALL Edit
CALL Ask Message 2
IF reply equal to ‘Y’ THEN
DO
CALL Write File 2
ENDDO
ELSE
DO
CALL Write File
ENDDO
ENDIF
ENDDO
ENDIF
ENDDO
ENDIF
ENDIF
ENDDO

ENDIF

IF mode equal 1 THEN

DO
CLOSE Guestroom File
CLOSE Temp File
REMOVE Reservation File
RENAME Reservation File TO Temp File
ENDDO
ENDIF
ENDDO

Module Edit
DO

DISPLAY options

DO WHILE choice not equal to 0

GET choice
DO CASE
Choice 1
DO
CALL Input String for Name1

ENDDO
Choice 2
DO
CALL Input String for Passport number1
ENDDO
Choice 3
DO
CALL Input String for Flight number1
ENDDO
Choice 4
DO
CALL Input String 2 for Time of flight1
ENDDO
Choice 5
DO
CALL Input String 2 for estimated time arrival1
ENDDO
Choice 6

DO
Input Value for Number of rooms1
ENDDO
Choice 0
Quit
OTHERWISE
DO
DISPLAY “Not within the range”
ENDDO
END CASE

ENDDO
ENDDO
Module List
DO
IF status entry is ‘S’ THEN
DO
DISPLAY “Name of guest”
DISPLAY “Passport number”
DISPLAY “Check-in-date”
DISPLAY “Check-out-date”
ENDDO
DO WHILE not end of file
DO
DISPLAY details
SET increase row by one
ENDDO
ENDDO
ENDIF

ENDDO

Module Delete
DO

CALL open temp file
CALL Show Screen
CALL Input String for target record
SET status entry to Open File
IF status entry is equal to ‘S’
DO WHILE not end of file

DO
CALL Read File
ENDDO
IF name is matched with the target record THEN

DO
IF not end of file THEN
DO
CALL Write File
ENDDO
ENDIF
ENDDO
ELSE
IF not end of file THEN
DO
SET mode to 0
CALL Display Details
CALL Ask Message
IF reply equal ‘N’ THEN
DO
CALL Write File
ENDDO
ENDIF

ENDDO

ENDIF

ENDIF

ENDDO

ENDIF
IF mode equal 1 THEN
DO
CALL Error Message
CLOSE Guestroom File
CLOSE Temp File
REMOVE Reservation File
RENAME Reservation File TO Temp File
ENDDO
ENDIF
ENDDO
Module Ask

DO
DISPLAY Ask Message
ENDDO
Module Ask 2
DO
DISPLAY Ask Message

ENDDO
Module Error
DO

DISPLAY Error Message
ENDDO
Module Error 2
DO

DISPLAY Error Message
ENDDO
Module Open File
DO

IF error in open Reservation file THEN
DO
DISPLAY “File empty”
SET open file status to fail
ENDDO
ELSE
DO
SET open file status to success
ENDDO
ENDIF
ENDDO
Module Read File
DO

Read record from file
ENDDO
Module Write File
DO

Write record to file
ENDDO
Module Write File 2
DO
Write record to file
ENDDO

Program Listing


Note: This part contain the print out of source program.


Implementation – Hardware and Software Configuration

Hardware Configuration:

Normal Pentium machine with the following requirements:

  • Minimum 4 MB RAM

· Minimum 10MB of hard disk free space

· Connected Dot Matrix printer

Software Configuration:

· Windows 98

· Borland C++ version 3.0 (DOS)




Implementation – User Manual

The captured screen shown above shows the menu, which displays 5 options for the user to choose from. They are the Add, Search, List, Delete and Quit.

Add option allows the user to add in a new reservation, to choose this option, type 1.
Search option allows the user to search a particular booking through name and then to edit the booking if necessary, to choose this option, type 2.
List option allows the user to view the names, passport number and the check-in and out dates of all guests, to choose this option, type 3.
Delete option allows the user to delete any cancellation of bookings or any wrong bookings done by the staffs, to choose this option, type 4.

If the user would like to exit out of the program execution, choose 5 to exit out. Bear in mind that the acceptable range of options that the user can choose from is 1 – 5, otherwise the screen will display error message. If the user should make any mistake when making the selection, just press on any key to reenter the choice.



Upon pressing 1 in the main menu, the user will come to the screen as shown above. The user is required to enter the data for the data items shown on the screen. When the data for the first three data items is entered, upon pressing enter, the screen will show a message as shown on the next page. The acceptable range of entry for the date is from 1 to 31, 1 to 12 for the month and 2000 to 2500 for the year, if numbers entered are not within the range, error messages will be displayed respectively. Bear in mind that only numbers are accepted in the entry of the check-in and check-out dates.

The same goes for the entry of the number of rooms, only numbers are acceptable and the range of entry for it is from 1 to 20. If the number entered is not within the range, then error message will be displayed on the screen.


If ‘N’ is entered, the user will reenter again. If the user enters ‘Y’, it means that the rooms have been blocked and the user is required to enter the particular of the guest. The first one to be entered is the name of the guest, this program only allows maximum 20 characters to be entered, if the entry exceeds 20 characters, then the screen will display error message, just press on any key to reenter.

The second data to be entered is the passport number of the guest, the entry of this data item is alphanumeric which means that the user can enter anything, however the user is restricted to enter maximum 15 characters only, if the entry exceeds 15 characters, the screen will display error message*.

The third one will be the flight number; the entry for the flight number can be anything but it is restricted to maximum 6 characters. If the entry exceeds 6 characters, then error message will be displayed on the screen*

The entry for the fourth and the fifth data items is the time, the time mode is based on 2400hrs. The range of numbers to be entered is from 0000 – 2400. The number of characters to be entered is minimum and maximum 4. If the user enters more than or less than 4 characters, then error message will show*. Take note that the entry for the time is only numbers, therefore if any letters or symbols are entered, error message will show *.
After all data have been entered, the program will prompt the user whether to save the data (as shown below). If enter ‘Y’, then the data are saved, if enter ‘N’, then the data are not saved and the screen will go back to the main menu.


When the user enters 2 in the main menu, then the user will come to the screen as shown above. This is the screen where the user can do the editing part.

But firstly, to retrieve the desired record from the file, the user will have to enter the name of the guest to retrieve the record. After pressing enter, the screen will display the record as shown on the next page and the user will be prompted whether to change the data.

If the user enters ‘N’, the screen will go back to the main menu. If ‘Y’ is entered, then the screen will further display some options as on the next page. These options are actually for the user to choose whether which part of the record he wants to edit. Choose 1 if he wants to edit the name, choose 2 if he wants to edit the passport number, choose 3 if to edit the flight number, choose 4 if to edit the time of flight, choose 5 if to edit the arrival time, choose 6 to edit the number of rooms or choose 0 if he does not want to edit anything. The range of entry is from 1 to 6 and 0 to quit, if the entry is not within the range, the screen will display error message*.


After editing the necessary information, the user can choose 0 to exit out of the editing and the program will prompt the user whether to replace the current data. (As shown below)


If ‘Y’ is entered, the data is replaced. If ‘N’ is entered, the screen will go back to the main menu, no data is replaced.

When the user enters 3 in the main menu, he will come to the listing screens which enable him to view all the names of the guests in the file and their passport number check-in and out dates. The listing screen is shown below.

After viewing the data of the desired record, the program will prompt the user to press on any key to proceed that is to return to the main menu.

When the user enters 4 in the main menu, he will go to the screen as shown below.


To retrieve the record to be deleted, the user will have to key in the name of the guest. After keying in, the desired record will be displayed on the screen as shown below.


The user will be prompted as to whether he wants to delete the record. If the user enters ‘N’, the screen will go back to the main menu and no record or data is deleted. But if the user enters ‘Y’, them the record is deleted from the file.

If the user would like to terminate the program, just enter 5.

* In any case when the user make a mistake in choosing the options or enters data which are invalid, the user can just press on any key to reenter.


Conclusion – Program Strengths
Lastly for my conclusion, I would like to pass some comments about my program. Basically, my program is made up of 5 options to choose from. These 5 options will prove to be efficient to the user as just by entering the name of the guest, the user can easily retrieve the record that is to be deleted or edited. When entering the dates, the program can actually detect invalid date entered for the month, and the user will be required to enter again.

In the program, the format for the time entry is based on 2400 hours mode and the standard entry for the time is only 4 characters, thus no confusion when the user enters more than or less than 4 numbers as error message will pop up to tell the user that the standard entry for time consist of 4 numbers only. This is to prevent any acceptance of ridiculous entry by the user.

To improve the efficiency of the user at work, the user can actually check the check-in and out dates of all guests under the listing menu. Just by choosing the list option, the screen will show the information as to which guest will be checking in on which date and checking out on which date etc.


Conclusion – Program Weakness
Due to time constraint, I have failed to do the source program for the chart. This chart is used in the Add module.
When the user enters the check-in & out dates and the number of rooms, this chart is supposed to check for the number of available rooms within the range of dates entered. Without this function, the program is unable to locate the availability of rooms and also unable to block the rooms in the chart.

I have not done the validation check for the entry of the time. That is the standard entry range of time based on the 2400 hour mode is from 0000 – 2400. However, the user can enter any number that he wants, so long as it is 4 numbers. This is not logical as how can the entry of time be 2401 or 2500.

Conclusion – Program Enhancements
In the near future, some enhancements can be made to the program. A print function can be added to the program so that the user can print out a particular record or print out all the information that is displayed on the Listing module.

A calculation function can also be added to the program. It is to keep track of the number of days the guest is staying. The program will do the totaling up of the amount that the guest has to pay based on the number of days that the program has kept tracked of. Then a computerized billing invoice is issued to the guest upon check-out.

Recommended Answers

All 2 Replies

May I have also a cup of "coffee and a croissant" please? :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.