aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes What shall Data class really do? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "What shall Data class really do?" Watch "What shall Data class really do?" New topic
Author

What shall Data class really do?

mohammad abdellatif
Greenhorn

Joined: Aug 29, 2007
Posts: 24
Hi,
I am currently working on SCJD assignment, I have some concerns regarding Data class which must implement interface DBMain.
In assignment document it is written
Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface:

package suncertify.db;
public interface DBMain {


What does data access class means?
Does it means the only class from which to access DB file stream and perform locking and unlocking is Data.java OR I can have helper class used internally inside Data.java to do such things??

To be more clear:

I am planing to separate the behavior of locking records and accessing DB file bytes to two classes used internally by Data.java.
Can I do this or what??

Thanks for your concern
Matheus Mendes
Ranch Hand

Joined: May 15, 2007
Posts: 66
Hi mohammad !

Well it's all on your interpretation. You could do whatever you think is right. But you must try to do the best way and justify this decision. The most important isn't WHAT you did, but the WHY you did it.


The Death of one is a tragedy, but the Death of a million is just a statistic. Joseph Stalin

SCJP 6.0, SCJD
mohammad abdellatif
Greenhorn

Joined: Aug 29, 2007
Posts: 24
Thank you very much for your response.

I was thinking in the same way you have just wrote, but I wanted to make sure if I really understood what was written in requirements.

After completing the assignment, I will make sure to put my grade on this topic as a record for others to see if what I was thinking is right.

Thanks again
Matheus Mendes
Ranch Hand

Joined: May 15, 2007
Posts: 66
Sorry if I was too short on my post, I was entering in a meeting.

But that's the whole thing, you should think and try to get the best solution. An advice, when I designed my application I did separete the locking class and the database class. So I have a utility class that care about my locking mechanism and another class that implements the provided interface. But the class that implements the provided interface isn't yet my real class, It access another class that handle the file write and load. =)

Well, when you finish , please post an idea of what is your solution and why is it that way.

=)

On this forum you have experts like Roel, Perillo, will be pretty hard you get a question without a clear anwser =)

[]s
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5545
    
  13

Matheus Mendes wrote:On this forum you have experts like Roel, Perillo, will be pretty hard you get a question without a clear anwser =)

Trying to do the best we can


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2267
    
    3

Roel De Nijs wrote:Trying to do the best we can


And glad to be able to help!


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What shall Data class really do?