aspose file tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes DBMain interface question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "DBMain interface question" Watch "DBMain interface question" New topic

DBMain interface question

Wesley Gibbs

Joined: Jul 07, 2006
Posts: 2
>> Your data access class must be called "", must be in a package >> called "suncertify.db", and must implement the following interface:
>> public interface DBMain {

Are we expected to not add additional method signatures to the DBMain interface? I assume that we cannot make changes the signatures already exist since they came with the download.

Thank you in advance,

Wesley D. Gibbs
Oliver Weikopf
Ranch Hand

Joined: Feb 17, 2004
Posts: 58
Hello Wesley,

no, you may not change the interface by adding methods or by altering existing method signatures.

Jason Moors
Ranch Hand

Joined: Dec 04, 2001
Posts: 188
Oliver is right, you shouldn't modify the DBMain interface, however you could extend the interface or create another interface which your class could implement.

This is what I have done to provide Schema information to the client.

Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 918

Hi Wesley,

Well, if you feel like you wan to add new methods you can extend the DBMain.
The specs contains the must just before implement:

soo I'll not risk.
More I think(you can read i am shore) that sun have some test automats for the Data class so you may get a automatic failure if you change the interface.

But if you still want ot change it, and you have good reasons, you can ask sun about it.

Regards M.

Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
If your Data class implements DB(Main) indirectly it still implements it.
My assignment at least doesn't state that it should be implemented directly

It is sorta covered in the JavaRanch Style Guide.
subject: DBMain interface question
It's not a secret anymore!