• 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

What shall Data class really do?

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
mohammad abdellatif
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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



And glad to be able to help!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic