I'm bit confused with the existence of method create & delete. I was wondering why it is defined in the supplied interface.
My spec states that the UI for this assignment must satisfy the following criteria:
* Must use Swing.
* Allow user to search the data of all records. (Therefore, I know the purpose of defining the find & read method in the interface.)
* Must present search result in a JTable.
* Must allow user to book a selected record, updating database accordingly. (update method)
Well, that's it. The spec doesn't mention about, for example, creating a functionality where users can add a new record into the database or deleting an existing record.
The spec, does mention that the UI "should be designed w/ the expectation of future functionality enhancements...".
So, I assume that in the end, I still have to create the implementation for the create and delete method.
However, I think It would look weird if these chunk of codes just laying dormant when the application is running, or maybe I just simply miss the reason why
those methods should be defined.
Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must
implement the following interface:
and then an interface follows with create & delete method. so my data-class should implement these methods (otherwise it wouldn't compile).
now the question is: is throwing an UnsupportedOperationException also an implementation? i think it's a valid choice but document certainly document this decision.
i did implement both create and delete, because implementation is not hard at all, so why risking an automatic failure...