jhao wang

Greenhorn
+ Follow
since Aug 31, 2003
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 jhao wang

This report shows the total number of points awarded for each section. The maximum number of points is 400, to pass you need a score of 320.
Section Summary: Section Max Actual Score Score
General Con: 100 100
Documentation: 70 70
OOD: 30 30
GUI: 40 16
Locking: 80 80
Data Store: 40 40
Network Server: 40 40
Total: 400 376
Thanks Andrew
Thanks everybody
17 years ago
When testing my assignment, I meet a strange case.
I started a server in one PC, and started some clients on other defferent PCs to access the server. All the PCs are in the same Local Area Network, and all worked well.
While in another case, I started the clients to access the server through Internet, not the LAN. I can find the data well, but fail to book a record.
And the exception is MalformedException. I can not understand this: If the server IP is malformed, I should not find the data either.......
Help me. Thank you!!
In instructions.html:
"It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user. "
I use two checkboxs and two textfields to implement the requirment. I think there are 3 cases:
a). name
b). lacation
c). name and lacation
But someone else said that there is fourth case: d). name or lacation . What do you think about this??
Thank you,Andrew.
I accept your suggestion.

Reading the thead you provided, I decide not to create the 'suncertify.db.SecurityException' either, but I still catch it.
Q5:
"Any unimplemented exceptions in this interface must all be created as member classes of the suncertify.db package. Each must have a zero argument constructor and a second constructor that takes a String that serves as the exception's description. "
This interface called "DBAccess" is provided by SUN in which there are some exceptions.
I created 'RecordNotFoundException','DuplicateKeyException' .......in suncertify.db package except the 'SecurityException'.
Because the 'SecurityException' exists in java.lang package, it seems that I need not create it. Must I create it in the suncertify.db package??
Today I found a fatal error and solved it. When a record is locked by anthoer customer, the thread which also wants to lock the record did not wait for it released, just throw exception and exit.
I modified the lock method, and it runs well.
Q4: In sun instructions.html:
"1 byte flag. 00 implies valid record, 0xFF implies deleted record"
0xFF==255, 1 byte is -128~127, java seems no unsigned type
how to understand this.
Hi,Chris Hegarty, this is my solution:
Code:
----------------------------------------------------------------

You can see that in fact almost all the operation is in Data.class.
When you start the application, the ConnectFactory can return a same database interface to you, yet it was created by defferent ways according to the mode.
I also hope to get suggestions about my code from Andrew Monkhouse and Ken Krebs
Thank you
[Andrew: removed major sections of code]
[ September 08, 2003: Message edited by: Andrew Monkhouse ]
Q3. "Your programs must not require use of command line property specifications. All configuration must be done via a GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory. "
To solve the Q2, I show a input dialog box to let user enter the db file name or remote server URL address. According the Q3, I should store what user entered(db file name/URL address) into the file: suncertify.properties. And the keys are decided by me. Is that so??
What I most worry about is automatic failure. It seems that I don't understand the sun instructions very well.
Thank you very munch, Andrew. You have helped me greatly.
Thanks Arun Kumar and Andrew Monkhouse !
Andrew, you think there is only one parameter: mode or no parameter. Only two cases, because the Instructions says
[Your programs must not require use of command line arguments other than the single mode flag, which must be supported] .
While see this
[Your choice of RMI or serialized objects will not affect your grade, but no other approach is acceptable. In either case, 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. ]
This really confuse me !
Please help me
Q2 continue
I read the following sentence again and again:
"The mode flag must be either 'server', indicating the server program must run, 'alone', indicating standalone mode, or left out entirely, in which case the network client and gui must run "
mode = server, than run server program ;
mode = alone, than run client program ;
If no mode or (mode != server && mode != alone ) , run client program still
Is that so??
"in which case..." is which case, "left out entirely" case??
I'd thank Andrew first.
I almost complete my assignment. I am testing and checking the code, and preparing for packing my project. I read the SCJD instrutions again and again, while I still can not understand it well.
-----------------------------------------------------------------
Q1: " All numeric values are stored in the header information use the formats of the DataInputStream and DataOutputStream classes. 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. The character encoding is 8 bit US ASCII. "
I use RandomAccessFile class to read and write value. Must I use the DataInputStream and DataOutputStream classes??
-----------------------------------------------------------------
Q2: " Your choice of RMI or serialized objects will not affect your grade, but no other approach is acceptable. In either case, 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. No authentication is required for database access. "
" When you submit your assignment, each part (client and server) must be executable using a command of this exact form:
java -jar <path_and_filename> [<mode>] "
" Your programs must not require use of command line arguments other than the single mode flag, which must be supported. The mode flag must be either 'server', indicating the server program must run, 'alone', indicating standalone mode, or left out entirely, in which case the network client and gui must run "
" The executable JAR containing the programs. This must be called runme.jar. "
According my understanding about upper words, I wrote only one main class to start programs with defferent commands:
To start client program: java -jar runme.jar alone
To start server program: java -jar runme.jar server db.db
Am I right??
-----------------------------------------------------------------
English is not my mother tongue, I just want to make it sure.
I still have other questions, I will post them next time.
Thank you all!!
Thank you Mark!!
I got the FBN assignment from my classmate.
I downloaded the Bodgitt and Scarper assignment just last week, I want to complete it in two weeks, so I can take the written examination before 1/10
Thank you very much
Hi all.
My assignment is about Bodgitt & Scarper.
I am from Shanghai,China. English is not my mother tongue,so I have trouble to understand how to book a record.
I ever got an old assignment about FBN Service, and i coded the sample for it. In the FBN Service assignment, when you book a record , the seat will be counted down.
While in the new version assignment(Bodgitt & Scarper), when you book a record, the size(workers number) will be counted down?? Or you should write 8 digit number to owner field, and the record will not be booked any longer?? If it is, how can I get the 8 digit number???
Thanks!