Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Confused...

 
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
 
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
 
The moth suit and wings road is much more exciting than taxes. Or this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic