• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Confused...

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic