In my assigment I "must" implement an interface DBMain with these method signatures. public void delete(int recNo) throws RecordNotFoundException; public int create(String data) throws DuplicateKeyException;
The trouble is no where in the assignment have I been asked to let the user perform these operations on the data file. I have been asked only to provide for searh functionality on the data file. Should I still provide delete and create (in Data.java and the GUI) or is it okay if just threw UnsupportedOperationException in my code for create and delete.
The reason why I ask is well, the assinment looks like it was generated by a computer so maybe there is something seriously wrong with my specs. Another reason is that Sun expects people to finish this assignment in 20 hrs so I guess they really dont want to see any extra work being implemented.
Please let me know if I have misunderstood something.
I don't think that anyone knows with certainty the answer to your question, though everyone is aware that if they implement every method in the interface, their specific application will not use the create() and delete() methods.
One brave soul has posted that he trivially implemented create() and delete(), wrote comments about how he would implement them in the future, and lost no points.
Thanks, Javini Javono
Joined: Jun 18, 2004
Hello Javini !
Thanks for letting me know that there is nothing wrong with my specification. I guess I'll implement the methods anyways. Its not that much work. I wont be propogating these features on the GUI in anyway though.