Hi guys,
I am almost done with my project and doing the final check. I would like to ask some questions to make sure it is correct:
1. There is a Magic Cookie Value in the beginning of the file, I use it to check if the file selected is a valid database file for this application. I think this is a fixed value for my application, right? For example, I read the file Sun provided, and this value is 513, then I just use 513 to decide if a certain file is valid or not.
2. There are two Exceptions required to implement - RecordNotFoundException, and DuplicateKeyException. I only put two constructors in this two classes as mentioned in the instruction - one without argument, the other with a String argument. Is this OK? Is there anything else we need to do in the Exception class?
3. When handling the Exceptions in the project, I just throw the Exceptions from one class to another, and catch them in the end out side. And, in the catch block, I just simply printStackTrace(), is this OK?
4. I have a configuration window for Network-mode Client to setup the host address and port before the main GUI. I also have a different configuration window for Standalone application to setup the location of the database file before starting the main GUI. Is this OK? Do we need to merge these two windows? Because in the instruction, it says
Non-networked Model
... Architecturally, this mode must use the database and GUI from the networked form, but must not use the network server code at all.
...
Network Approaches
...the program must allow the user to specify the location of the database, and it must also accept an indication that a local database is to be used, in which case, the networking must be bypassed entirely.
5. When I test my program now, I need to run "start rmiregistry" first. Do we need to somehow make this also in program?
Thanks a lot.
Yu