SCJP 1.4<br />SCJD
Originally posted by Mike Tilling:
1- What do you provide as parameters when booking the selected record?
I will implement the booking method as follows (Thanks to Edwin Advice):
-On a create operation, I will provide all values including the customer
-The room can be booked if the owner is not empty regardless of what the date (available date) is. If the date is 10/10/2005 (one year ago) and the owner is not empty then the room can not be booked, what the user should do is to unbook the room to reset the owner into blanks or reaffect it to an other customer, the unbook reset the owner regardless of the date value.
in other words :
The booking request will be accepted if (date is today and owner is empty)
Or (date is tomorrow and owner is empty) or (date is after tomorrow and owner is empty).
3-If date is after today +48 hours and the owner is empty, will the room be ready for booking?
Originally posted by Mike Tilling:
does your assignment have this spec
"They take bookings only within 48 hours of the start of room occupancy" ?
Is the date field described as follows
"Date available : The single night to which this record relates, format is yyyy/mm/dd" ?
I see that you did not take date in consideration, if the owner is empty than you book the record, what if the date is not within the next 48 hours?
-when you book the record, you only provide the custoner ID, what about the new value for the date field, do you keep the same date for ever?