Can you please share why you're certain those two points have nothing to do with 44/80?
What happens if two applications try to create new records simultaneously?
What happens to a client who is waiting for a lock to be released for a record which becomes deleted?
Just out of curiosity, may I ask then, why you took this certification? I have heard many candidates say that they are taking it for the learning experience, but I don't think this was necessary in your case.
My Data class was made thread-safe by making every public method of the DB implementation synchronized.
So basically leave the interface as it is, and then when you write the class that implaments it you could make the methods throw any additional exceptions you see neccessary.
Yes I did fail and I only got 7 out of 80 points in locking. In the rest of the asignment I lost very few points.
But if unlock() almost always throws RecordNotFoundException, how can you remove it from your unlock method?