Hi Fernando,
In my interface:
I added description in javadoc, because it is the interface and you have to describe your complete method signature, so it has nothing to do with your implementation (it could be thrown or not from your Data class), but because it could be thrown you have to mention it in your javadoc.
in my Data class:
From my data class no DuplicateKeyException is thrown and why I decided not to throw it, is described only in my choices.txt. I don't agree on this one with K. Tsang, because in an interface
you should mention what your method is supposed to do ("create a new record and throw DKE if a duplicate key is detected") and not how it is implemented.
And normally you program against an interface and you don't have any knowledge about the implementation that will be used, so because the create-method in the interface is throwing DKE, you have to handle this exception in your program (if you would call this method, so not in this assignment).
Kind regards,
Roel