Roy Mallard

Ranch Hand
+ Follow
since Jul 14, 2005
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 Roy Mallard

I did URLyBird 1.3.2. You will be able to download your assignment after you buy a voucher for the assignment. I used the Sierra/Bates SCJP 1.4 book, which has a section on SCJD. "Effective Java" by Bloch is also good.
13 years ago
I sat the exam on January 29 and have already received the results!

General Con: 100 97
Documentation: 70 64
OOD: 30 30
GUI: 40 28
Locking: 80 80
Data Store: 40 40
Network Server: 40 40
Total: 400 379
13 years ago
The certmanager database says I don't have the right to upload the assignment, is this because I am supposed to sit the exam first?
Some of my classes have a zero-arg public constructor automatically generated.
Am I supposed to generate JavaDoc comments for these? The requirements state that I have to have javadoc comments for "each element of the public interface of each class". So is the automatically generated constructor part of the "public interface" or not?
I am using timestamps for this and it works fine.
I am currently using sun.net.util.IPAddressUtil to determine if the string entered by the user is a valid IP address. Is this considered part of the "core" Java classes?
If not, what is a good way of checking for a valid IP address? I could create a new URL and catch the MalformedURLException but I think that falls under "using exceptions for flow control". Anyone have any bright ideas?
I think you might be ok actually. The original .db file won't have any modifiable records due to the 24 hour rule, so maybe Sun will use another .db file to test your program with.
However if your program quits without even showing an error message I think you will fail.

That is an interesting point about making the .db file writable. My spec says that I must submit the file unchanged, and I'm not sure if making the file writable constitutes a change.

Anyone have an opinion on this?
How much documentation are we supposed to do?
Are we supposed to provide anything else besides the user guide, javadoc and choices.txt?
Wow this is the first time I have seen 40/40 for the GUI.
Could you please describe your client GUI and server GUI?
13 years ago
If I have JavaDoc for my interface methods, do I also have to do JavaDoc for the implementations of those methods?
I mean the field types (string, date, number etc.) are not given in the data file, so you need to get the type information from somewhere.
I currently hard-code the field types in a class, although I might change this to read the field types from a .properties file.
The requirements seem pretty vague about this...one thing I do that might fall into this category is to generate the table and search form dynamically based on the schema obtained from the server.
I'm not sure how "future functionality enhancements" could be implemented without requiring a new program version, since dynamic class downloading is not allowed.
Rahim - not sure which assignment you are doing but in Urlybird 1.3.2 there is a "header" section of the data file that contains the name and length of each field. So if your assignment is similar you should definitely not hard code the field names/lengths.
The field types are not given in the file header, so I also needed to have some sort of seperate schema which matches the data file.
My delete() method has the side effect of unlocking the record, which seems reasonable to me but there is nothing to indicate that it should (or shouldn't) do that in the original comments for the method.

My find() method declares that it throws RecordNotFoundException, but it never actually throws it. If there are no matches I return an empty array.

Also my Data.java is designed so that each client is given its own instance to use. If multiple threads share the same Data.java instance the behaviour will be unpredictable since I don't synchronize all the methods.

Could someone please tell me if this meets the specifications?
Sounds like you need to lock the record list against concurrent access during startup. The record list will obviously only need to be populated once (when your server starts up and you read the .db file)