aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes booking Procedure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "booking Procedure" Watch "booking Procedure" New topic
Author

booking Procedure

Tahir Abbas
Ranch Hand

Joined: May 05, 2007
Posts: 44
In my application when user selects Booking item from menu it shows a panel for user that displays all field values in JLabels except ownerID that displays in JTextField. In the bottom it has two buttons for moving to next and previous record as well as a combo box that shows all record numbers so user can select any record randomly. then there are buttons for Reservation and Cancellation.

I used cardlayout and in my search result there is an extra column for record numbers so user can know which record (number) he wants to reserve. then my booking form shows one complete record at time but here in this form he can see only one record so he need to see the search results for comparative records. Is this approach reasonable but I observed here many ranchers used JTable for the selection of required record to book.

Other question is this that I am thinking in array of String[] data all values except for OwnerID should be null, ({null, null, null, null, null, gettxtOwnerID().getText().trim()} ) then pass this to update method there it'll check if any field value is non-null and also match value length with field lenght , then update it with the new value.

In case of udatation it'll show dialog box updated successfully. Here I dont need to refresh the data from database as it shows one record at a time thats directly coming from database.

Another thing is un-booking that I think can be done by just sending empty value not null with the (almost) existing code, no need of new method for cancel booking. but on the other hand its not required so extra headache.

Thanks in Advance
Best Regards!
Nicolas Kal
Ranch Hand

Joined: Sep 09, 2009
Posts: 69
Hi Tahir,

Regarding the booking procedure I suppose that is a bit over complicated than it is expected. You have mentioned that once the book menu is pressed then a new panel is displayed with the record's data. I don't see the point of adding extra effort to do this since all of your information is allready displayed on the JTable that you must have on your application. Furthermore the user is expected to remember the records' id to select a Hotel from the combobox. In my approach the booking can be performed on the JTable. On the returned result set there is a button to book a record for a customer. Once it is pressed it checks if other clients are holding locks and if not it displays a simple dialog box that expects the customer's id in order to complete the booking.

Regarding the String[] data I have chosen to work with custom objects. To be more specific I have created a Hotel object that maps to the db schema rather than expecting from junior developers to know on each index of the array what kind of data it will hold.

As far as ti concerns the un-booking it is not mentioned in the instructions and no extra-points will be given. I have thought of implementing it too but I came across several issues and why it cannot be implemented with the currect db schema. What I did is that I have mentioned it to my choices.txt and how it could have been implemented if we had different db schema.

Regards,
Nicolas


SCJP 6.0 , SBCD (Preparing..),
MSc Enterprise Systems Development, BSc Computer Science
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: booking Procedure