aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes changing Date available when making booking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "changing Date available when making booking" Watch "changing Date available when making booking" New topic
Author

changing Date available when making booking

Ronald Wouters
Ranch Hand

Joined: Apr 28, 2005
Posts: 190
Hi all,

my instructions state in the Database Schema section

(my highlighting)

I guess this means that in addition to updating the customer code I also have to set the Date available to the next day when making a booking...
Anyone else done this ?
Just double checking ...



Sun Certified Developer for the Java 2 Platform
Sun Certified Enterprise Architect for the Java Platform, Enterprise Edition 5
Martin Sturzenhecker
Greenhorn

Joined: Dec 11, 2005
Posts: 23
Hi Ronald,


I guess this means that in addition to updating the customer code I also have to set the Date available to the next day when making a booking...
Anyone else done this ?


I don't change the available date in my assignment (URLyBird 1.1.3). There is no guarantee that a room is available the next day/night - the hotel may be fully booked tomorrow.

In my imagination a hotel tells URLyBird to sell so many rooms for a single night. If they have 5 rooms that means 5 records in the database file. If there is just one room for today and tomorrow there are two records in the database file.

The only column that may be changed IMO is the customer id column. An empty column indicates an accomodation is available, a non-empty column means this room is booked by some customer.



cheers
martin
Ken Boyd
Ranch Hand

Joined: Dec 10, 2003
Posts: 329
from my assignment ONLY customer number column gets updated when you book hotel for given date..


SCJP, SCWCD, SCBCD, SCJD, BB Java2 and JSP1.1
Ronald Wouters
Ranch Hand

Joined: Apr 28, 2005
Posts: 190
In my imagination a hotel tells URLyBird to sell so many rooms for a single night. If they have 5 rooms that means 5 records in the database file. If there is just one room for today and tomorrow there are two records in the database file

I hadn't tought of it that way but after thinking about it I agree with you guys. I think I will also stick with just updating the customer code.
It was that single that had me confused. Normally when a customer leaves his/her hotel room it is available again afterwards. I had forgotten that URLyBird is not an actual hotel but a broker for hotel rooms. As a broker they indeed can not assume that the room will be available the next day.
Doesn't that mean that there should be some kind of housekeeping routine that would delete booked rooms if the date available is past for more than one day ? I guess that is what that "legacy application" does they mention in my instructions ? Or should we have an automatic houskeeping when the server starts up ? Maybe there should but it is out of scope for this assignment ?
Anyway, thanks again guys.
Martin Sturzenhecker
Greenhorn

Joined: Dec 11, 2005
Posts: 23
Good morning Ronald,


Doesn't that mean that there should be some kind of housekeeping routine that would delete booked rooms if the date available is past for more than one day ? I guess that is what that "legacy application" does they mention in my instructions ? Or should we have an automatic houskeeping when the server starts up ? Maybe there should but it is out of scope for this assignment ?
Anyway, thanks again guys.


I will leave all housekeeping to legacy applications. The only thing is the infamous 48hrs rule, which I may implement (but I'm not yet decided on that matter).

-martin
Ken Boyd
Ranch Hand

Joined: Dec 10, 2003
Posts: 329
I have implemented 48 hour rule. It is just date check with current and one given in db..just one method..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: changing Date available when making booking