• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confused...

 
Anurag Mishra
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Guys,
I have modified the Data class insted of extending it, and created a seperate class called LockManager to handle record locking mechanism,But I am confused how to give explanation in the essay exam that why I had modify the Data class insted of extending it. Please help me in providing the justification of my design. How i will explain this in my essay exam.
Anurag Mishra
 
Jason Stortz
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suppose some of this question and answer is mostly opinion so here goes. I felt the Data class as it was provided was partially incomplete. It has empty lock and unlock methods which were not declared abstract. Had they been abstract to start with I may have thought harder about extending.
As it was, I decided to go your same route as I felt anyone desiring to reuse the data class would benefit from having implemented criteriaFind, lock and unlock methods and if they wanted different behavior they THEY could extend and reimplement my implementations of those methods.
Jason Stortz
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic