This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes about two data class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "about two data class" Watch "about two data class" New topic
Author

about two data class

Devu Shah
Ranch Hand

Joined: Jun 21, 2001
Posts: 50
hi everybody there,
could u please tell me what does this mean in the assignment specification:
" To connect with your server, you should create a client program.this implementation should include a class that implements the same public methods as the suncertify.db.Data class although it will need different constructors to allow it to support the network cofiguration"

the impression what i got was from the above was to create two db.data class,one for networking and other for local.Is that right?
and if then could u tell me whether lock/unlock method should be implemented in the local mode"
Rick Fortier
Ranch Hand

Joined: Jun 04, 2001
Posts: 147
the impression what i got was from the above was to create two db.data class,one for networking and other for local.Is that right?
The first goal is to use the same Data class to access the file whether in local or remote mode. If you created two different classes, then what code would be different? You still have to open the file and read, write. That code is already done.

and if then could u tell me whether lock/unlock method should be implemented in the local mode
It will not be necessary to lock in local mode since no other user should be accessing the file.


[This message has been edited by Rick Fortier (edited June 21, 2001).]
Paul Anilprem
Enthuware Software Support
Ranch Hand

Joined: Sep 23, 2000
Posts: 3315
    
    8
Although locking is not needed in Local mode but
1. The Data class should not have any idea whether it is serving a local or remote request.
2. Neither should the client side know about the mode.
3. Only the layers that interface the client and the server sides should know about the mode.
So, you need only one Data class which has the required functionality.
I'm assuming that you are modifying (instead on extending) Data class and are implementing locking mechanism inside Data class.
-Paul.
------------------
Get Certified, Guaranteed!
www.enthuware.com/jqplus

SCJP2 Resources, WebCompiler, Compare Mock Exam Results and More!
www.jdiscuss.com
Your guide to SCJD exam!
www.enthuware.com/jdevplus


Enthuware - Best Mock Exams and Questions for Oracle/Sun Java Certifications
Quality Guaranteed - Pass or Full Refund!
Jeff Song
Greenhorn

Joined: Nov 05, 2002
Posts: 27
If you get the remote object via interface from UI, It is not fulfill the requirement that UI should connect to server through DataClient!!??
 
Don't get me started about those stupid light bulbs.
 
subject: about two data class