Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

woo sung hwang

Greenhorn
+ Follow
since Feb 09, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by woo sung hwang

i am wondering how you guys get 0x0000201 like that. I am doing B&S 2.1 and spec say that magic cookie value is 4 bytes numeric value. so i use readByte() 4 times and i got 0021.
how i get cookie value like you?
and am i worng?
Hi, I am not native english speaker and i have several qeustion to undersand specification.
I am doing B&S.

1.provided interface.
1.1 there are method like read update and so on.
In read method, my spec say "Reads a record from the file....".
In creat method, "creates a new record in the database".
My data access class, which implement above method in
provided interface, has a adapter class to access XX.db
file physically. is it worng?
Should My data class access XX.db file directly?

1.2 There are many method in interface. All method must be
called by GUI?
I found some word "search" and "book" in spec about GUI.
How about other mehtod such like "update", "delete" and "create".
Are these optional function in gui?

1.3 Some method in interface have return values
like String[] int[] int ..
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
code.suncertify.db folder.
Am i right?

2.about XX.db 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?

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.

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?

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 ?

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?

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.

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?

It was long guestion. but i really need to help and to understand above question.
Hi. I also have same problem and i still not sure what should i do for coding.

"must not involve the serialization of any objects" in non-networked mode.

My guestion is that client will ask the Data class directly(i.e. data.read(recordNumber) ) and will return Srting array or any other return value.
If String array will be retruned, it would be serialization object. isn't it? because String is serialization object.

am i right?

if so, what can i do?
how can i avoid it? what kind of return value are valid?