I have the URLyBird assignment. This assignment has the business rule that a hotel room can only be booked within 48 hours of the start of room occupancy. I understand this to mean 48 hours before the date when the room becomes available or could this be 48 hours after the date when the room becomes available? In my implementation I opted for a thin client and I have the following search requirements :
Due to the above search requirement I allow rooms to be returned and displayed on the client even if the date a room available is not within 48 hours of the current time. Then when a booking is made I check the date and if the current date is within 48 hours I allow the booking otherwise I return an error message. It would seem to make more sense to only return bookings where the date is within 48 hours therefore the user can only see rooms that can be booked.
Anybody have any suggestions.
[ June 29, 2004: Message edited by: Stephen Patrick ] [ June 29, 2004: Message edited by: Stephen Patrick ]
Your implementation looks reasonable in the context of the assignment. In the real world, it probably would be better to show only rooms *available* for booking, which means that they are available and there occupancy date falls withing the next 48 hours. But if you do, you'll have to make the rule optional or configurable (properties) to make possible for the grader to test your application with available data.
I am doing the URLybird 1.3.2 agginment. In my assignment statement this 48 hour rule is mentioned in the general description about the URLyBird company's operations. It is not specified in the THE USER INTERFACE section which puts down the explicit requirements for the UI. like it must use only swing components.. it must allow users to search for all data. or for records with ....
Thus I am planning to doument my assumption that the 48 hou rule will be managed by the entity who is generating the database file each day. An the ui that I am building does not even know about any such rule .
What do you guys think, does it sound justifieable ?
This question needs to be directed back to you. Can you justify your decision? Do you believe you may lose points for not implementing the 48 rule? In your view does it appear in the background to the spec. for any particular reason?
If you are unsure read some of the hundreds of threads that have been written on this topic.
I originally chose not to implement it then had a last minute change of mind and added a 48 hour optional filter.
Whatever you decide to do make sure its clearly documented in the design decisions.