File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Reason of lock/unlock only 1 record? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Reason of lock/unlock only 1 record?" Watch "Reason of lock/unlock only 1 record?" New topic

Reason of lock/unlock only 1 record?

Jan van Buren

Joined: Dec 04, 2005
Posts: 6

My assignment is URLyBird. Customers can enquire of there is a room in a hotel an then book a room. The interface specifies I must lock a record before updating it. Booking is an update so I must lock. Only thing is most customer just want a room and not that specific room locked by somebody else booking it.
If a hotel has 3 spaces then if room one is locked I want to try room 2 and not wait until the first room is unlocked (and properbly booked/deleted).
The issue also affects my UI. Can I display that a hotel has 3 rooms available or must I display 3 separate rooms?

I am thinking at building a islocked and if the answer is no then lock it. Bad luck for the customer then but that is what is demanded in the exam. Good approach or am I woring to much?
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11778

Hi Jan,

Welcome to JavaRanch and this forum.

You are definately worrying too much . What you are suggesting, while nice in the real world, is beyond the requirements of the assignment. When in doubt, go back to your instructions and re-read the following:
You will not receive extra credit points for work beyond the requirements of the specification.
(In other words, if you implement something that is "nice to have", you cannot get any extra marks for it, but you can loose marks if you make a mistake in your extra work.

Regards, Andrew

The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
I agree. Here's the link:
subject: Reason of lock/unlock only 1 record?
It's not a secret anymore!