Thursday, October 7, 2010

THE HOTEL BOOKING INTERFACE ASSIGNMENT (SNAPSHOTS)-By Samson Mkandawire

                                         THE HOTEL BOOKING INTERFACE

Introduction
The hotel booking interface is a computer interface that can be specifically designed and programmed in order to allow hotel owners and workers to get clients details and in store them in their computer’s hard disk or a database. In this outline, a brief description through snapshots of outputs of a program that is designed and coded to produce a hotel booking interface is given.

The snapshots below have been produced by a Java program. The program has been developed by using the Java Runtime Environment (JRE) which has the Java Development Kit (JDK) as the compiler and the jGrasp as the text editor. The outline below include attributes and functionalities which can be used to capture the clients information and again either check the client’s information or save the client’s information if the client is first booking the hotel.  At the same time, it provides a section of the experiences that  have been learnt from producing the code that generates the snapshots below.

Attributes
After running the program, the code produces an interface which has the following: name of the hotel and the section where the services of booking are offered (Booking section), the motto of the hotel, labels of the required information from the clients, the fields where the client’s information is supposed to be filled, two subheadings which divides the client’s information (client’s details and booking details), the made of payment used by the client (Cash, cheque or credit card) and a button point which contains three buttons (confirm, cancel and exit).

The name of the hotel and the section where the service is applied makes the interface to directly recognize the hotel and specifically identifies the section where the user of the interface (computer) is working. It is not editable hence no user of the system can alter it in order to access the services of the hotel fraudulently. In other terms, this aspect identifies the hotel uniquely.

The motto of the hotel (The Home You Can Trust!...) gives the client a chance of understanding the type of the hotel and its services.  It is also not editable in order to protect the hotel from individuals who might decide to access the services of the hotel fraudulently.

The client’s details specify the information that is required which uniquely identifies each client. It has two sections namely: the labels of each piece of the required information and where the information is supposed to be filled or selected. The labels are not editable while the information in the fields once filled can be edited by the user. The labels include the title of the client, the name of the client (its corresponding field can take both surname and first name), address of the client, phone number of the client, nationality of the client, emergency contact name and emergency contact number (phone number).
The booking details species details pertaining to the actual process of booking. Again it has two sections namely: the labels of the required information and the fields where the information is expected to be filled.  The labels are not editable while the information in the field can be edited once it has been filled. The labels include number of days booked, room class (single, double, suite), date of booking, date for checking in, date for checking out, booking fees in Malawi Kwacha and mode of payment which specifies the kind of payment which the client can use (cash, cheque or credit card). The mode of payment has three options with a restriction that a client can only use one of the three means for a booking at a time.

The button point has three buttons namely the confirm button, the cancel button and the exit button. The confirm button is used for checking the correctness of the information selected or filled on the form of the interface. It is operated by clicking it with the mouse. Once a user clicks it, there is another form produced that contains all the selected or filled information if the information has been filled, if the information has not been filled it produces a form with the labels but without their respective required information.

The cancel button once clicked clears all the information in the fields. This button allows the user to re enter the details in the field once a mistake has happened in entering the details.

The exit button is used to exit or close the window. The exit button can be used in the same way as the ctrl+x keyboard command or the close icon on the window (X). 

After clicking the confirm button, the user will produce another form which will contain all the information on the first form and at the same time it will have three buttons namely the save button, the open button and the cancel button. The save button allows the user to save the displayed information in a file.  The open button opens an already saved file to check the information of the client who had already made a booking with the hotel and the cancel button cancels the confirm form.  

SNAPSHOTS 
Once the program has been run, an initial window (interface) is produced and it is from this window where the user of the interface can start his or her operations in capturing the client’s information into the computer. The initial window has been produced in such a way that it can be minimized, maximized or even closed at any time the user fills to do so. The interface shows all the required details at the same time as in figure 1.0 below;

                              Figure 1.0: Blank Hotel Booking Interface Form

 




In Figure 1.0 above, the blank field can be filled with the client’s information where the title, the number of days booked and the room class can be changed to suite the client’s details. Once the information has been filled, the above form will look lie figure 2.0 below;

                                Figure 2.0:  Filled Hotel Booking Interface Form


      

Figure 2.0 above shows the hotel form interface with the information of the client filled in the fields. This information can be edit by the user while still filling more information. At the same time, the user can change the information of any field which has already been filled or clear all the information by clicking on the clear button to restart the whole process of filling in the information again. After filling in the information in the fields, there is a need to check whether the filled information is the correct information. To do this the user has to click on the confirm button which produces another form (Window) which contains all the labels of the first plus the filled information. The information on the confirm form (window) is not editable as shown in figure 3.0 below;


                                     Figure 3.0: A verification form
   

Figure 3.0 above shows the filled information of the client produced along side the first form (window). The information on this form is not editable.  In this case, if the user want to change some or all of the information, then he or she should click the cancel button or click on the close icon (X) on the window otherwise the user can maximize the window for clear view as per figure 4.0 below;
        
                                            Figure 4.0: A maximized confirm form
   
      


Figure 4.0 above shows a form containing client’s information in a maximized status which is not editable. If the user is satisfied with the information filled then he or she can proceed to save the information into a file by clicking the save button. Once the save button is clicked, a window will appear on top of the first window requiring the user to specify the folder in which the file will be saved and at the same time, specifying the file name as shown in figure 5.0 below;

                              Figure 5.0: Hotel booking interface with a save dialogue box
    

The Figure 5.0 above shows the form with the client’s information and the save form where the user specifies the fold where the information to be saved is stored and a file name field where the user types the file name for identification at a later stage. If the user has specified the folder and the file name, then he or she has to click on the save button on the save form. Once the save button has been clicked, the program will check whether the file name already exist or not. If the file name typed by the user already exist then the program will produced another box indicating that the file name given to identify the client’s information already exist otherwise the system will save the information in the specified information. The dialogue box for the file name that already exists is as shown on the figure 6.0:

                    Figure 6.0: A message box indicating that the typed file name already exist
        

The figure 6.0 above shows a form with a dialogue box indicating that the file name used by the user already exists in the saving system of the program. Once the program has indicated that the file name then the user is supposed to click on ok button and then return to the save button on the confirm window where he or she is supposed to restart the process of saving the information.

Apart from saving information from new clients, the hotel has clients who had already made bookings with the hotel. In this case there is need to confirm the clients claims by checking his or her information in the system. If this is the case then the user of the interface has to click on confirm on the first window (that is the interface that is generated after running the program) in order to go to the save Window.  After the second window has been generated, then the user has to click on the open button. This will produce an Open dialogue box which provides a text field where the user is supposed to type in the file name where the client’s details were saved. The open dialogue box is as the figure 7.0 below;
    
                           Figure 7.0: A hotel booking form with an open dialogue box
        
The figure 8.0 above shows the open box embedded on the main interface (form). The above open form allows the user to enter the file name and once the file name has been entered, the program will check with the files kept in the system. The figure 8.0 below shows the open box with the file name typed on the file name text field;

                        Figure 8.0: An open dialogue box showing the typed file name
    
  

The figure 8.0 above shows an open window dialogue box with the file name typed on the file name field embedded on the main interface window. After the user has typed the file name, the program checks the file name amongst the files saved in the system. If the file name is not amongst the files saved in the system, a file not find dialogue box is displayed otherwise the program opens the file with the saved information. The figure 9.0 shows the file name not found embedded on the main interface form.   

                     Figure 9.0: The message dialogue box indicating file not found

     

EXPERIENCES THAT HAVE BEEN ACQUIRED
The above displayed snapshots have been produced by a program coded as part of an assessment task for the final grade for the award of a Bachelor of Sciences in Mathematical Sciences Education. At the same time, the task was given as course work for understanding how graphical user interfaces are produced using java language. As part of course work, they are several experiences learnt from the process of coding the program and at the same time compiling and running the code for the above snapshots to be produced. Some of the experiences learnt include debugging of a java code, use of different layout managers in java, positioning of different objects on a panel, linking of different classes (both user defined and the pre defined classes), Use of action listeners, production of different java windows which are linked to each other and placing of press buttons, radio buttons and check lists on the panel of a given window. These experiences are outlined below;
Debugging of a java 
Development of any computer code (program) involves the programmer making a lot of errors. These errors are both compiler and run time errors. It takes a great deal to learn and understand these errors in order to come up with a code which can run and at the same time produce the desired output. With this assignment, debugging of codes that involve the production of graphical user interfaces has been learnt and at the same time mastered such that using this experience, codes which produce graphical user interfaces can be produced.

Use of different layout manager
The layout managers in java are responsible for controlling the positioning of components on a panel or frame. In the program which was coded to produce the above snapshots employed two layout managers. These layout managers are the flow layout manager and the GrigBagLayout manager. The Flow layout manager which in java is used as a default layout manager was used in placing the press buttons. On the other, the GridBagLayout manager was used to place all the components on both panels.

Positioning of different Components on a panel
The hotel booking interface has different components like the labels and the fields where information is filled. These components are supposed to be aligned correctly so that the interface should be meaningful and the collect information should be filled in the collect fields. The production of the above snapshots has made this to be learnt and mastered. 

Linking of different classes
The code which has generated the above snapshots has used both user defined classes and the already defined classes that have their attributes and methods inherited in the code. The linking together of these classes has given much experience in developing of graphical user interfaces by using both user defined classes and pre defined classes in java.

Use of action listeners
The above snapshots have been generated by a java program which has buttons that are supposed to be operational (doing what they are intended for) on the produced interface. For these buttons and check lists to be operational, there is need for action listeners and the application of these action listeners has provided much experience in working with action listeners.

Production of different java windows that are linked to each other
The code that produced the above snapshots has two windows. The first window is produced after running the program while the second window is produced after the user has clicked on the confirm button of the first window. These two windows are generated by two different classes are calling each others’ methods.

Placing of press buttons, check lists and radio buttons   
The above snapshots have press buttons, radio buttons and check lists which are linked to action listeners so that after clicking them, an action is generated. The inclusion of these buttons has provided much experience in developing graphical user interfaces that simplifies the work of the user as the user just clicks the buttons instead of keying in every information from the clients. 

Conclusion
The major objective of the program was to develop a hotel booking interface (using Java Programming Language) that hotel owners can be used online or electronically. It does some basic features like capturing clients’ information, saving clients’ information and opening fclients' files from the hard disk. There is, however, a need to develop it further so that the file can be saved to or retrieved from the database. At the same time, the program should be able to generate a dialogue box for checking cheque numbers or credit card numbers so that the client should not fraudulently acquire the booking services of the hotel.


  
 

No comments:

Post a Comment