Marcel Svacina

Greenhorn
+ Follow
since Jan 07, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Marcel Svacina

Ok, many thanks, I will lock/ulock during updating, describe all in choices.txt and will hope, that it will satisfy all requirements.

Many thanks guys
In my assigment is:

It must allow the user to book a selected record, updating the database file accordingly.

Sorry,English is not my born language, as you noticed

So, can any one explain we, what the hell the Sun want to me in this "must" requirement?
Does it mean, that:
1) I have to implement usecase "book record", which locks given record and unlock will be made in the end of the usecase update,delete or calling unlock usecase

2) The lock/unlock mechanism should be implement as a part of usecases update or delete?

thanks



So, if my understanding is right, you did not implement waiting mechanism during locking and you did not fulfill one "must" requirement?

Hello

In my assigment, In case, that record is locked, to fulfill "must" requirement, I have to call wait() until the record will not be unlocked. What application should do during this waiting? Theoretically, record can be never unlocked. My opinion is, that should be better to tell the user, that record is already locked, and should to try it later, but this solution will not fulfill the "must" requirement. How did you solve this problem?

Thanks
That is what I want to hear :-)

I did it and I did not fail

Thanks
If you programm against interface, it is as for me bad way to write

When you write

you are not able to use methods from MyI without casting to MyI, so as I said, that is not good solution.

Roberto's post is absolutely right, but my still not answered question is, if this means

1) that Data implements MyI and SunI
2) or Data implements MyI and inhereted methods from SunI. This case does not realize must implements DB interface requirement

This is only 'play on word' for me. I need to be sure, that i will not fail on this 'play on words', if you understand me :-)


Can you assure me, that when I write code above, it means, that Data implements MyI and SunI? And that it is not differ with must "Data class must implement SunI" and I will not fail? In my born language it little bit sounds like that Data implements only MyI, where MyI iherit methods from SunI. It is misquided and hard to explaint with my English :-)
Thanks for your patience :-)

Sorry, it is little bit confusion for me. Are you sure, that in this way, when Data implements MyInterface, that it means that it implements both interface? MyInterface and SunInterface? For me, in Czech, it sounds that Data class implements all methods from MyInterface and all methods from SunInterface, but SunInterface's methods are inherit by MyInterface.

So if I will write

I comprehend, that data implements SunI and MyI but if I will write

so in this way my Data class implements only MyI which extends SunI, but still implements only MyI

Sorry, there was a problem with my English :-)

If I am not understanding right correct me. You say, that I may add extends declaration to DB interface, but I can not add method to the DB interface? Why?

Thanks
But in my assigement 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"

So I think, that my class Data.java has to implement DB interface.
Hi

Please, is it possible to add more methods to the DB interface? For example, I would like to add method to get all records from DB file.

Many thanks for all opinions.
Hello

Is it possible to extend DB interface in B&S ? There is no "not must" about extension of DB interface in my assigement.

Thanks
Hi guys

Please, I have one question about determine End Of File, when I am using RandomAccessFile. Here is my code

while (raf.read() != -1) {
raf.seek(raf.getFilePointer() - 1);

I do not thing, that this way is the best one, can you tell me about better one?

Thanks

P.S.: Sorry for my English :-)