• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding some new methods to Data class.

 
Olena Golub
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear professionals,
I have a question about Data class. Can I add some additional methods, that haven�t been declared in the DB interface?
When the Data class instance is initialized in another class in what way should it be declared?:


Or in this way?


The second one gives me the possibility to add some useful methods to the Data class. For example getRecordCount(). Can I add some new methods to the Data class?
The Data class is only class that communicate with db file. And I need to receive the count of all records in the class for building the Table. And I see only this possibility to receive this count from Data.

How do you think?
Thanks a lot for your help!
Olena
 
Eric Chang
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, putting in additional methods will not results in loss of points...just make sure you don't add them to the interface as well as that would violate the fact that you must not modify the interface.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic