• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Questions regarding Data access class

 
Udham Singh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Javini Javono
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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
 
Udham Singh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanks once again.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi "Bodgitt",

Welcome to JavaRanch.

We don't have many rules here, but one we do have is the JavaRanch Official Policy On Displayed Names, which requires your displayed name to be a real name.

Could you please change your displayed name to meet this policy? You can change it here.

Regards, Andrew
 
Udham Singh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry about that !

Didn't mean to break any rules.


Udham
 
Eben Hewitt
Author
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For what it's worth, I did choose to fully implement Create and Delete. So they have their own menu items, and their own screens and all.

But I know it is not necessary, because a number of developers have passed implementing only Search and Book (update).

I did not allow the user to edit records (like change a name or the size of the company or other info). So update to me means Book, because it does update the record.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic