• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

several Question about spec by sun

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Woo,

Welcome to JavaRanch and this forum.

I would recommend writing smaller questions - some people are too afraid to answer so many questions. Having two or three posts, each with only one or two questions is generally a better option. My answers are going to be short (simply because you have so many questions), so feel free to ask for more information if you want to.

1.1 Should My data class access XX.db file directly?

An adapter is fine.

1.2 There are many method in interface. All method must be called by GUI?

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.

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.

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.

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?

Yep

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?

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.

Those candidates looking at the hex values of the cookie and trying to relate it back to the version of their assignment are going way outside of scope (and being typical geeks ).

By the way, have you looked at Integer's toHexString() method?

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.

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 ...?

If you hard code column name and length somewhere, then you are making your Data class specific to your assignment. Do you think the schema can be used to make a more reusable object?

2.3 deleted flag value is 1 byte. Is using readByte() correct?
if not, what read methd shold i use?

Yes, that is appropriate.

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?

Yes.

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 ?

Have you looked at what common interfaces they all implement?

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?

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.

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.

It is bad English, and we have had many discussions about this. One of the more common interpretations (and one of the easiest ) is:
  • name or
  • name and location, or
  • location.


  • 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?

    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?

    Basically it means that you must have only one client GUI, and only one Data class - they will be used for both the standalone client and for the networked system.

    Regards, Andrew
    [ February 11, 2006: Message edited by: Andrew Monkhouse ]
     
    woo sung hwang
    Greenhorn
    Posts: 4
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    thanks mate.
     
    reply
      Bookmark Topic Watch Topic
    • New Topic