Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DBMain interface question

 
Wesley Gibbs
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>> Your data access class must be called "Data.java", 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,
Wes
 
Oliver Weikopf
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Wesley,

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

Oliver
 
Jason Moors
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oliver is right, you shouldn't modify the DBMain interface, however you could extend the interface or create another interface which your Data.java class could implement.

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

regards
Jason
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic