An adapter is fine.
1.1 Should My data class access XX.db file directly?
Nope - you also have an instruction telling you that you will not get extra marks for going beyond the specification. The specification only requires booking from the GUI.
1.2 There are many method in interface. All method must be called by GUI?
You are safe unless you explicitly serialize objects in non-networked mode. Just because a class implements the Serializable interface does not mean that it will be serialized when used.
In non-network mode, serialization object must be avoided when database and GUI communicate.
String and int are serialization object. isn't it?
I have no idea to solve this.
1.4 The Interface reside in suncertify.db package.
Packaging of submission section say that "directory called code
contain all source code".
It means that the interface reside in
Am i right?
It does not matter how you validate your magic cookie, as long as you end up with a value you can reliably use to validate your data file.
2.1 the XX.db file has magic cookie it is 4 byte numeric.
So i use readInt() using RandomAccessFile.
If i use readByte() 4 times i got 0021.
which one is right?
I read other peoples question about magic cookie
and i saw some like 0x0000201. how can i get the number?
Using readByte() 4 times is correct?
Have you noticed that there is nothing in the Data class that is specific to the assignment? That is, the same Data class could be used for Contractor information, or for Hotel information, or for Airline information, or for Customer information ...?
2.2 all schema information are recorded in the x.db file.
In my coding, do i need to read column information from file?
because i will define column name and length in somewhere.
Yes, that is appropriate.
2.3 deleted flag value is 1 byte. Is using readByte() correct?
if not, what read methd shold i use?
2.4 I read number of fileds in each record using readShort().
I gust number of field does not count a deleted flag?
Am i correct?
Have you looked at what common interfaces they all implement?
2.5 Spec say that "all numeric values are stored
in the header information use the foramts of
the DataInputStream and DataOutputStream.
Do i need to care of it when i use RandomAccessFile ?
Yes, the assessor will look at your other classes and allocate the 40 points accordingly. As long as your clients can only access the data through the Data class (that is they cannot access your utility classes directly) you should be fine.
3. marking criteria
Data class get 40 marks. Data class is the class which implements the provided interface. if i use other class to access file and lock and so on. My data class will be too simple. Will 40 points be evaluated to other class?
It is bad English, and we have had many discussions about this. One of the more common interpretations (and one of the easiest ) is:
4. In GUI, user search the data for records where name and/or location fields. It means that name, location and name&location. or name, location, name&location and nameORlocation. is it slly? But it is hard to undersand.
You will have a client GUI that you will use when running a networked client - this gui is being used in "networked form". Does that make sense?
5. Non-network mode section say that"Architecturally, this mode must use the database and GUI from the networked form, but not use the network sever code al all.
what does mean the above sentence? and whta does "networked form" mean?