Due some problems with assignments upload. I have a few additional days=)))
My DBMain interface have signature for unlock method
My Data class implement DBMain interface. And in Data implementation I do not throw RecordNotFoundException because its not necessary and I describe it in me choices.txt.
But i have a questions Should I change signature in the Data class to
For every method implementation you just need a valid method override. So the 1st signature and 2nd signature are valid overrides, so it really makes no difference which one you use. Because you should always develop against an interface instead of an implementation (and so you must catch the RNFE although your implementation class won't throw it).
And in Data implementation I do not throw RecordNotFoundException because its not necessary and I describe it in me choices.txt.
Nice I did exactly the same, I even went a little bit further. In my own custom interface (which extends DBMain) I override the unlock-method (without the throws clause). The advantage: I didn't had to catch the RNFE (which is never thrown).