This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of DevSecOps Adventures: A Game-Changing Approach with Chocolate, LEGO, and Coaching Games and have Dana Pylayeva on-line!
See this thread for details.

Shan Jun Hao

Ranch Hand
+ Follow
since May 23, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Shan Jun Hao

Originally posted by sultan khadar:
Congrats Shan. Could you please share your experience in detail ? Also please explain what is HFJS.

Thanks.
Sultan.



Hi there,

HFJS is a book called Head First JSP & Servlets. You can find the link http://faq.javaranch.com/view?ScwcdLinks

Excellent book! Strongly recommended deep from my heart.
18 years ago
Hi Renato!

Thanks so much for the effort. Greatly appreciated. Hope you do well in your SCBCD exam!
I just found it.

Try something like "Mikalai Zaikin SCBCD notes" or "Mikalai Zaikin SCBCD notes .pdf".

You should be able to see one of the links is a .doc extension. That is the one. 136 pages.
Anyone knows is there a place where I can download Mikalai Zaikin's notes in printable / PDF format?
Whoo!

I passed SCWCD! Despite my heavy work schedule, I am satisified that I am able to achieve such score.

Special thanks to HFJS's authors. This book is wonderful! In fact, I only read through this book once, tried the mock exam and went for the test. I finished the test in an hour.
18 years ago
Abit confusing here... can someone pls help me.

This is a portion of the delete method from DB.java



I am confused with the phrase:

Deletes a record, making the record number and associated disk storage available for reuse.



I thought this method simply just indicate an invalid flag in the database file? But associated disk storage available for reuse is really confusing me.

Originally posted by Jason Moors:
If you don't implement the update method how will you modify the record to show that it's booked?

I would recommend implementing the methods as it doesn't require much code and would support future enhancement to the GUI and also will aid you in creating test files.

Data class method implementation

regards
Jason




Hi, sorry I missed out on that. Update will be implemented. Not create and delete.
Gather from the posts I've read, I think its just knowing exactly what you have done, go through choices.txt and have a good rest before exam.
Erm... maybe you can re-read your instruction again? Everything should be stated there.
I know this topic has been repeating showing itself here. But I still need the views from you guys here. My instruction did not mention anything about update(), deleted() & created() implementation. The closest I can find is:

Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface: (The usual DB.java)



and

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



Other than that, I simply can't find anything whereby I need to implement that 3 methods. I thought of just implementing them in Data.java(of course =D) and thats it. I will just document something like "this method is out of the scope of the assignment given"

What do you guys think?
Hi,

I am trying to do what Andrew has demostrated in his book.



I keep on getting errors with the short value - java.lang.NumberFormatException: For input string: "". Can anyone tell me how to convert the String to a short value?

there is no way for the client to know if the update operation succeeded or not.



Are you required to implement this method? Maybe you can take a look at the instructions again.

Why do the create method throw a DuplicateKeyException???



When a duplicate key is found existing in the database.

I think its more of how you eventually decide to implement the primary key.
Daniel thanks for the information! Yes I am able to do it correctly now!! Cheers!
Alright... something weird here. I managed to solve the question I raised earlier on. However, I don't think that's the right solution.

The problem lies with the length of my smoking restriction. In my instruction, it mentioned the field length is 1. However, I realise that I need to set it to 3, then the fields that come after smoking restriction will not display wrong output(bcos of some positioning).

I feel that this is kind of weird. Either SUN has an error in their instruction (which I don't think so) or something wrong with my logic. Can anyone advise?

I am also wondering if it got to do with:

Data section. (offset into file equal to "offset to start of record zero" value)
Repeat to end of file:
2 byte flag. 00 implies valid record, 0x8000 implies deleted record
Record containing fields in order specified in schema section, no separators between fields, each field fixed length at maximum specified in schema information



How do I read this section?
[ August 09, 2006: Message edited by: Shan Jun Hao ]
Hi Daniel,

After much consideration and reading my instruction:

Locking

Your server must be capable of handling multiple concurrent requests, and as part of this capability, must provide locking functionality as specified in the interface provided above. You may assume that at any moment, at most one program is accessing the database file; therefore your locking system only needs to be concerned with multiple concurrent clients of your server. Any attempt to lock a resource that is already locked should cause the current thread to give up the CPU, consuming no CPU cycles until the desired resource becomes available.



I decided not to implement this. However, I will just document the possibilities of future enhancements.