• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Public interface for Data class

 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have a question regarding the public methods of the Data class that alter the db. Specifically:
1.) Is there any need to expose add() and delete() to the client?
2.) In this assignment, is there any need at all to use add(), delete() or the constructor that creates a new db [Data(String, FieldInfo[])]?
3.) The delete() method only tags the record as deleted. Over a period of time, the db is going to bloat with deleted records. Should a compact() method be added to remove the deleted records?
Thanks in advance
Michael Morris
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1- Yes. But lets look at it more closely. The requirement state that the interface shoud have ALL the methods of the Data class. So exposing them to the client is required.
Now is the client actually going to use those methods. No.
2 - No.
3 - No, it's not in the requirements.
Hope that helps
Mark
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,
Once again we can count on you to help the rest of us out. I (we) appreciate all you do here.

Thanks again
Michael Morris
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic