my dog learned polymorphism*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Modifying vs Extending Data class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Modifying vs Extending Data class" Watch "Modifying vs Extending Data class" New topic
Author

Modifying vs Extending Data class

ravi janap
Ranch Hand

Joined: Nov 04, 2000
Posts: 389
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


SCJP, SCJD, SCWCD, SCBCD, SCEA
Max Habibi
town drunk
( and author)
Sheriff

Joined: Jun 27, 2002
Posts: 4118
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


Java Regular Expressions
ravi janap
Ranch Hand

Joined: Nov 04, 2000
Posts: 389
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)
Sheriff

Joined: Jun 27, 2002
Posts: 4118
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

Joined: Nov 04, 2000
Posts: 389
Hi Max
I have posted my review on Amazon yesterday. They should take 5 - 7 days to publish it.
Thanks
Ravi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Modifying vs Extending Data class