Nick Lee
Originally posted by Nick Lee:
Hi all,
In the Hotel Room booking system,there is a db field named "Data available",I'm confused what's this field for,and now,my answer is,it's the date of the available time,all the fields will be out of date after that time,and I needn't use this field to do any thing.
Am I right on this oponion? The doc is hard for me,a Chinese guy to understand,hope some one can help on that.
that says alot about your booking system, besides the fact that its the date for which the booking is made, its also the date you need to compare to when checking if the date is within range, theres a business rule that says it has to be within 48 hours of the room becoming available.
Nick Lee
Originally posted by Nick Lee:
Sorry sir,I still confused with what u mean,the room can be booked only around that date?
Originally posted by Ta Ri Ki Sun:
anyway, you can only book a room for the date that it is available.
and , you can only make the booking within 48 hours of that date.
so if a room is available 2003/06/01, then that is the only night that it will be booked for, and you can only make the reservation on 2003/05/30, 2003/05/31 and 2003/06/01
I hope you're unconfused m'lord, otherwise just ask again
Originally posted by frank sun:
Hi,TQ
I think it cannot book the current day's room. that's to say, take the example above, we can book the 2003/05/30 and 2003/05/31,not including 2003/06/01. (I remember you explained this in another thread )
https://coderanch.com/t/183230/java-developer-SCJD/certification/questions-new-assignment
I have a question, do we need to update this field
after booking the room? why or why not?
Regards!
Frank
Originally posted by Ta Ri Ki Sun:
Frank I'm sorry that I left today out of my last explaination, but I do allow bookings on the day, there should be no problem with someone attempting to make a last minute reservation.
now as for updating the date available field, there is no need to do that in this specs, for the purpose of booking a room the only field that is updated is the owner field.
in practice however all fields are updated, albeit with previous values, update takes a String[], so what actually happens in my implementation is that the value of owner is updated in the String[], but the update method overwrites everything in the record, it doesn't know or care what changed.
Nick Lee
Originally posted by frank sun:
Thanks, TQ
But I think, if the date includes 'today', then the time period is 72 hour, not 48 hour.
What do you think?
Regards!
Frank
[ May 10, 2003: Message edited by: frank sun ]
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Originally posted by Nick Lee:
hi TQ,(some one call u this,is it right? )
I think i've grasp what u said,but do I need to update that field after someone book it,to the day when the customer book it?
BTW,ur name looks like a japanese
So therefore, if I was booking the hotel room from my computer in Sydney, I would want to be able to book it for yesterday's date.
This gets far more complex in real life, but it gives you the idea.
So two choices: do you allow bookings for yesterday, or do you document that you are not considering date line variations. Either option should be aceptable.
Nick Lee
Originally posted by Nick Lee:
hi TQ,
I think what u said for some time,now a kind of situation pop up:
a man booked a room in 4th May,the Date Available of that room is 6th May,and he wanna live their since 6th May,that's reasonable i think,after some minutes(hours) some one wanna book the same room(it's still 4th May),but he wanna live their since 5th May.
so,the problem is,can we allow the 2nd one to book the room? if not,the room will be nobody-in for one day,if he can,what is the rule?
hope u can grasp what I mean.
Available date is not the date I wanna live in,how to diff them?
Date available date 10 The single night to which this record relates, format is yyyy/mm/dd.
Hey! Wanna see my flashlight? It looks like this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|