Hello everyone! After about 10 days hard work, I finally implement almost all the requirements of my B&S assignment. Without the great help in this forum, especially the useful advices from Andrew, whose excellent enlightening work makes people�s lives more interesting and better, I would never do it so quickly and perfectly, so I need to thank all the people here again.
According to other friends� proposals, I divided all the requirements into several small parts in order to achieve them separately and it works perfect! Here are some uncertain questions, which I don�t find similar answers to resolve now, I strongly desire to hear from you to set up my final submission:
1)About the Server IP. I think the process should be when the examiner tests the program in network client mode, he/she would input the right IP address of the server machine (using GUI ) which had already started by him/her. In other words, we don�t need to hardcode a common IP address in our programs, like 127.0.0.1 , localhost or something like this. I don�t know if I understand the process correctly.
2)About implementing delete and create methods in the DBMain interface. My instruction says, �Your data access must implement the following interface:�. There are two methods, delete and create, in the interface, but in the user interface section of this instruction which only requires the functionality of booking and searching, thus it makes those methods useless. My way is to implement them using some concrete sentences in the Data.java (which implements DBMain) and don�t invoke them in the client GUI at all. But how the examiner knows exactly to add right clauses testing the implementation of those methods in Client side? I don�t know whether the approach is right.
3)About null terminated text values. In the instruction, it told me that "All text values, and all fields(which are text only), contain only 8 bit characters, null terminated if less than the maximum length for the field". I have read the data in my JTable component already, but I don�t know how to test whether all the text values are null-terminated or not(maybe space-padding?).
4)About the class of reading db file. In the instruction, it says "all numeric values are stored in the header information use the formats of the DataInputStream and DataOutputStream classes". Should I be docked if I only use RandomAccessFile class to access the db file?
5)About SDK version. Following the instruction, "the platform must not have been superseded by a new production version for more than 18 months by the time you make your submission". Does this allow me to choose either SDK 1.4 or SDK 1.5 to compile the program if I upload the assignment next month?
6)Another locking manner in standalone mode. I know in standalone mode file level locking should be no needed. But what if a user opens several windows to run the same program? Do we need to ensure only one program should be run at one time in this mode? And if so, how to implement this?
7)About Owner field format. In the instruction� sDatabase schema, it describes Owner field as "The id value (an 8 digit number) of the customer who has booked this". I think the field contains number like 0,1,2�etc. So I decided to use JformattedTextField component to restrain users� input, only numbers can be accepted. Is that assumption right?
Any advice will be appreciated!
[ July 30, 2005: Message edited by: WarrenII Pan ]