• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

data class question

 
Rudy Yeung
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the assignment, it writes "... enhance the Data class. You may do this by modification or subclassing, but you should document the approach and reason for your choice."
Can I do both i.e. modification and subclassing?
 
Douglas Kent
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to specify one or the other. They are interested in your reasons. It goes without saying that if you subclass it, you are going to modify it. I chose not to subclass. Why? Because the project as given was incomplete and was specialized to a particular database. If it had been generalized, and you needed to make mods in order to have it work with the db.db datastore, then it would have been wise to subclass.
 
Adrian Yan
Ranch Hand
Posts: 688
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I perferred modify the Data class over extending it. I think you can do whatever you want, as long as you give a reason for doing so, and it must be based on OOAD principle.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic