This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S: Adding methods to Data that are not in DBMain

 
Eric Alex
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hiya,

My Data class implements all the methods that are specified in the DBMain interface. I've also added some other methods to the class that I feel that I need like:
getNumberOfFields()
getFieldNames()

Question: Is this ok or is the Data class ONLY supposed to contain the methods specified in the DBMain interface?
 
Mike Ottinger
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eric,
 
Mike Ottinger
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wooooops!

Hi Eric,

I added 2 additional public and 2 additional private methods to my implementing class. No problems with that at all. I would NOT add these method declarations to the supplied interface, though. Leave that untouched. Hope this helps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic