It is indicated in the assignment (UrlyBird) :
"They take bookings only within 48 hours of the start of room occupancy"
It also describes the field owner as follows:
"If this field is all blanks, the record is available for sale"
It describes the date field as follows:
"Date available : The single night to which this record relates, format is yyyy/mm/dd."
In my implementation:
1- On a create operation, I choose to provide all values except the customer,
I suppose the newly created record is for future booking purpose.
2- The record is ready for booking if date is today (the record is available for today) tomorrow or after tomorrow regardless of what does the owner field contain.
I am worried about this spec about the field owner "If this field (owner)
is all blanks, the record is available for sale". The booking system is
Based on the record availability and not on the content of the owner field.
When booking the record, a dialog box is prompted asking for the customer ID, the booking date and the duration which is the number of nights the room is booked for, if the booking date is prior to the today date or the record available date the user will be notified by an error message otherwise the booking request will be accepted and the date field will be the booking date increased by the duration (the number of nights the room is booked for).
Do I fit with the exam spec?
What do you provide as parameters when booking the selected record?
*I am thinking about changing the way I am booking the record as follows:
- On a create operation, I will provide all values including the customer.
- 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)
Will that fit better?
If date is after today +48 hours and the owner is empty, will the room be ready for booking?