aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes SCJD doubts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "SCJD doubts" Watch "SCJD doubts" New topic
Author

SCJD doubts

Vinicius Florentino
Greenhorn

Joined: Feb 26, 2008
Posts: 16
Hi all. Last week I started programming URLyBird 1.1.3. Almost finished (just some details and documentation). I'm in this salon to ask some questions:

1- JFC includes classes like: JMenu, Dialog... and can be used?

2- I used the recNo and the magicCookie in my lock Manager, however reading some topics, is it possible to "ignore" this value? Just read without validate the value and use to nothing? Im asking that because has nothing about how validate.

3- About GUI: "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." In this sentence could I let the user just 2 options: 1- Use a radio where habilits all fields and the search uses exacly the method "find...". 2- The other radio habilits only name and location, use the same method (find), and uses a filter to removes the different values.

4- About execution: "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 alone mode its ok, the client needs to specifie just the database location. But in the server mode, if always in this command I execute the server and the client, I cant connect with other server (Always connect with the started server)?

5- (the last one) About business: "They take bookings only within 48 hours of the start of room occupancy". In database fale contains only "date available", So Do I need to validate something? I think just if current date is equals o greter than that date.

Thanks all, sorry my english (I prefer portuguese).
Alex Belisle Turcot
Ranch Hand

Joined: Apr 26, 2005
Posts: 516
Originally posted by Vinicius Florentino:
1- JFC includes classes like: JMenu, Dialog... and can be used?

The rule/constraint is that you must not use a AWT components when their equivalent exist in SWING. For instance, you must not use Dialog, because JDialog exists. On the contrary, it's OK to use LayoutManagers from AWT because there are no equivalent in SWING.


2- I used the recNo and the magicCookie in my lock Manager, however reading some topics, is it possible to "ignore" this value? Just read without validate the value and use to nothing? Im asking that because has nothing about how validate.


==> If you are specifically referring about the "magicCookie": the purpose of this value is only to allow you to validate that the database file is really the one you are expecting. For instance, if you expect your database to have magicCookie = "1234", when open the database and the value is different, it means it is not a valid database. A database file with a different magicCookie might have a different structure, so your application would not be able to handle it.

As far as I know or think, the magicCookie should not really be involved in the locking mechanism, but only to check if the database file is the one your are expecting.
I used the magicCookie only when opening the database the first time, and never again after.


3- About GUI: "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." In this sentence could I let the user just 2 options: 1- Use a radio where habilits all fields and the search uses exacly the method "find...". 2- The other radio habilits only name and location, use the same method (find), and uses a filter to removes the different values.


Your requirement for searching only mentions name and/or location, so you [b]don't have to[b] let the user search with other fields.
I suggest you read this thread: http://www.coderanch.com/t/418334/java-developer-SCJD/certification/findByCriteria


4- ...
The alone mode its ok, the client needs to specifie just the database location. But in the server mode, if always in this command I execute the server and the client, I cant connect with other server (Always connect with the started server)?

I'm not entirely sure I understood. The "server" flag would start the application in "server mode only". You then need to launch the application at least once more using "no flag" in order to start the application in "network mode". Your "network mode" client will then allow you to connect to a running "server".


5- (the last one) About business: "They take bookings only within 48 hours of the start of room occupancy". In database fale contains only "date available", So Do I need to validate something? I think just if current date is equals o greter than that date.

Sorry, I don't know about that, I did another assignment. I hope someone will answer this one for you!

And sorry my Portuguese is way too poor, I can only say "Porto"

Alex
Vinicius Florentino
Greenhorn

Joined: Feb 26, 2008
Posts: 16
Hi Alex. I prefer portuguese, but the brazilian portuguese =] (Samba, futebol, pel´┐Ż...).

2- So, First I need to read the database file and know whats "my" magic cookie? And put hard code to verify if is valid?

3- OK. I read : "It must allow the user to search the data for all FIELDS". Thanks.

4- the complete execution text:
"Your programs must not require use of command line arguments other than the single mode flag, which must be supported. 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.

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

-------

I dont know if when I use server mode, the client connects only in the local server? Where can I just start the client to access a remote server, and how I start (and after stop) just the server? Im very Confusing about that.

Like in other post, my properties file will contains.:
[SERVER]
SERVER.port
SERVER.dblocation

[CLIENTSERVER]
CLIENTSERVER.host
CLIENTSERVER.port

[STANDALONE]
STANDALONE.dblocation=


5- I will wait a little for answer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SCJD doubts