File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Relating Max's book's project to the Sun assignment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Relating Max Watch "Relating Max New topic
Author

Relating Max's book's project to the Sun assignment

niko nolan
Greenhorn

Joined: May 22, 2005
Posts: 2
Hi,
I'm starting to work on my project. for now it looks big and complicated...
I have some questions about the sample project in Max's book before I begin:
1. (If I understand correct) the sample project in the book is using a database folder, with a seperate file for every record.
is this approach applicapble for SCJD? if not what is the best approach (search in a single file? write a single file in a "hashed" order? cash the records or maybe somthing else)?
2. I see in the sample project some usage of "status" return values. is this considered to be a good approach for Java, or should I stay with exceptions only?
BTW I'm doing URLyBird.

[Andrew: Changed subject to a more Meaningful Subject Line]
10x,
niko
[ August 22, 2005: Message edited by: Andrew Monkhouse ]
Thomas Paul Bigbee
Ranch Hand

Joined: Jun 28, 2005
Posts: 71
Hi Niko

Remember every Must (MUST) be adhered to or automatic fail.

The requirments state that you Must implement the given data access Interface, that Interface specifies the return values and Exceptions, so I guess your stuck with Exceptions vs Statuses, I would have liked to do it with Statuses as well. I believe that most people would. I suppose you could implement the Interface and then use your own methods, but I think the grader of the assignment would not like that too much.

This assignment can be broken down into smaller parts. Data Access, GUI, Server, I believe the best place to start is with the Data Access, as every thing else rests on top of it.

Fist off, save everything, burn your assignemnt on to a worm cd and keep it in a safe place, as you are required to upload your assignment with the original db.

Secondly, the database has been given to you, it has a bunch of header informnation about the number of fields, etc... After the header each row is fixed length (like a COBOL Copy Book) so if you take the length of the header into the equasion you can jump all around by record numbers. The best way (I know) is to use a RandomAccessFile to open the db with.

I would suggest, that you concentrate on opening the db, reading records from it, displaying fields from the records (all via console for now - no GUI), writing records (delete and recycle as well) to it (after formation, validation, padding, etc...), that will give you your methods for the Interface that you are required to implement.

Next, put together your GUI and access the db from it locally, doing everything from up above (plus displaying records from withing a JTable)

Next, start on your Server and remote data access.

I foolishly went the hard route early - Multi-Threaded Socket Server, interacting with a Multi-Threaded GUI and had to rewrite everything when it came to implementing the local data access methods.

Also, when you have a question, read the previous posts in this forum, as most of my questions were answered without having to ask.

I hope this helps, and remember, the above is just my opinion, I'm sure that there is more than one way to skin a this Cat.
Tom
Bob Reeves
Ranch Hand

Joined: May 01, 2003
Posts: 64
Hi Niko:

I would add one other suggestion to Tom's list: Look for the simplist approach to each design issue, as the grader can be harsh for undue complexity.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Relating Max's book's project to the Sun assignment