my assignment was URLyBird1.1.3 After reading through it,I found it didn't mention the requirement of providing a conversion tool, which turns the plain text data into binary and my db file is already binary so does it mean that I don't have to program for that conversion tool? (was there such a requirement at all?) thx eliot
Hello Eliot. I can relate to your question because I also was confused about this when I first started the assignment. My confusion came from an email I received from the Yahoo group when I first registered. This email talked specifically about a separate conversion tool. I think this is carry over from the original Fly by Night SCJD assigment (which has been replaced by URLyBird and Bodgitt and Harper, or something like that. I have URLyBird) Anyway, while we don't need a separate conversion tool with the new assignment, you do need some way of reading the data out of a file. Some of the people (including me) end up having a DataSchema type of class. This class has methods to spin through the database file, deal with the magic cookie (see magic cookie thread ) and read all the header information to get the number of fields, field names, field lengths, etc. (see the part of your data file format before the Data Section. The way I got started on all that was after I read the cookie thread I mention above I started working with the file to read out the information. Most people out here are using the RandomAccessFile class in some way to do this. See methods readInt, readFully(byte), readShort, etc. Some other potential search words for you on this forum might be "data schema" or "metadata". Good luck. TJ
Eliot, Terry's answer is correct. Just to give you a little more information though: There are three major assignment types issued by Sun: Airlines, Hotels, Contractors. For each of those major assignment types there are multiple versions, each with minor differences. One of these differences was that one version of the Airline's assignment required people to convert data from a plain text file into the binary database file. Another version didn't. I have not heard of this requirement being in any of the "new" assignments (hotel or contractors). You can read more about the differences in the assignments in the JavaRanch SCJD FAQ question titled "How may assignments are there? (What is an NX assignment?)" What this means is that someone cannot take your code and just use it in their assignment: it may not match their instructions. From your point of view though, it means that you may see questions asked that make no sense to your understanding of the assignment, and you may see answers given that you think are wrong. Both the questions and answers may be valid for a different person's assignment though. Regards, Andrew
Andrew - That's a great link for the SCJD faq page. But, where did you get the link? I've looked on every JavaRanch page, and even searched the html source code for the page name, to no avail. Have I gone blind? Or are there JavaRanch pages that don't have links and therefore are only known to a few folks (unless they get lucky enough to find a reference in one of the posts)? Thanks!
Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4 all those years ago...)
Hi Jeff, There are some pages that are not well known, but this one is not one of them. If you go back to the list of posts in this forum, you should see just above the list of posts, the following two lines:
The first line is in red. The second line is in a normal colour. Many of the forums have similar forum specific instructions and forum specific links in the same place. Regards, Andrew [ November 20, 2003: Message edited by: Andrew Monkhouse ]