• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Modifying vs Extending Data class

 
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I have chosen to extend the Data class to develop another class called NetworkData. Default implementation for lock and unlock has been provided in the Data class. The lock and unlock method have been overridden and the needed functionality has been provided in the NetworkData class. Thus, the NetworkData instance is especially used in network mode for lock and unlock functions. Most of the functionality with respect to accessing the Database is provided in the Data class itself so it is used in both network and non-network however in network mode where additional functionality is required with respect to lock and unlock, NetworkData class is used. NetworkData class is used to resolve the issues arising out of multiple clients competing for the same resources. The criteriaFind method has been implemented in the Data class.
Can I safely say that I have chosen to extend the Data class and the reason provided is logical?
I am providing this explantion in my design file. I wanted to be sure that this explanation is sufficient enough or do I need to give more reasons in support of my approach.
Thanks
Ravi
 
town drunk
( and author)
Posts: 4118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds reasonable to me: I don't really think that Sun cares which path you take here, so long as you know enough to argue your point intelligently. It sounds like you do.

Good luck,
M, author
The Sun Certified Java Developer Exam with J2SE 1.4
 
ravi janap
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Max
Your book has been a great help. Inspite of completing the asssignment, I read your whole book and it helped me to make improvements in certain areas.
Thanks
Ravi
 
Max Habibi
town drunk
( and author)
Posts: 4118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ravi,
I'm glad you've enjoyed it: I would be even more glad if you posted a review on Amazon .
All best,
M, author
The Sun Certified Java Developer Exam with J2SE 1.4
 
ravi janap
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Max
I have posted my review on Amazon yesterday. They should take 5 - 7 days to publish it.
Thanks
Ravi
 
reply
    Bookmark Topic Watch Topic
  • New Topic