File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes NX: Assignment questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "NX: Assignment questions" Watch "NX: Assignment questions" New topic
Author

NX: Assignment questions

Eric Kim
Ranch Hand

Joined: Feb 21, 2004
Posts: 37
My assignment is URLyBird v1.1.1, the requirement is not very clear on couple of issues:
1) It does not mention reservation functionality except in the overview section. Can I make the following assumptions:
. Be able to list all hotels and rooms regardless of available or not
. Be able to search hotels (using any combination of all 7 columns, perhaps something like: name=palace, location=small, smoke=y etc parameter format)
. Be able to reserve a room when required size is less than or equal to avaialble room in one of the found hotel.

2) It mentioned user configuration should be done via GUI. I assume this is through client GUI with a preference or setting or configuation menu and store these config info to a suncertify.properties file. This will work for a alone mode when client and server are on the same machine. What if the network server and database are on different machine than client (For instance, network server and database are on a solaris box and client is on Windows XP)? How to save those config information to server side? I think both server and client need config information to work properly.
3) The download just give me an interface definition about database implementation, when I implement this database, can I add more public methods, or should I be constrainted within these small set of interfaces?
4) What to do with magic cookie in the db file? It is a hex value like 00 00 01 01, even if I verify this value with a db file, it does not necessary meaning a db file is a valid file, does it deserve any attention at all?
5) About Delete flag, should GUI provide any function to delete a record at all? I did not find any requirement on this, but the db file contains this bit. What should I do with it?
6) Startup mode, the assignment requires something like this:
java -jar path_and_filename [<mode>]
mode can be server, alone or left blank.
Here is what the instruction says when left blank:
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 don't know what this means: "in which case the network client and gui must run", does that mean we should treat this as alone mode? I don't think there is any other way to operate this whole thing.
Thanks in advance
Eric
Satish Avadhanam
Ranch Hand

Joined: Aug 12, 2003
Posts: 697
Hi Eric, I forgot to say "Welcome to SCJD forum" in your previous post
Originally posted by Eric Kim:
My assignment is URLyBird v1.1.1, the requirement is not very clear on couple of issues:

The requirements are intentinally made ambigous so that they test on our decision making things on issues.

1) It does not mention reservation functionality except in the overview section. Can I make the following assumptions:

I think in the USER INTERFACE section also, they should have mentioned on how to do search and book. Maybe you can check that section once.

. Be able to list all hotels and rooms regardless of available or not

Yeah, its ok to show the booked rooms also. Then again, it depends on your design, if you don't want to allow the client to know about already booked rooms, you can only show those rooms which are vacant. If you want to allow re-booking of a room, then you must show all records.

. Be able to search hotels (using any combination of all 7 columns, perhaps something like: name=palace, location=small, smoke=y etc parameter format)

It is not required. If you check your USER INTERFACE section in the instructions .html file, there it should have mentioned on how you should allow CSR to search. In general only name/location search should be enough for project scope.

. Be able to reserve a room when required size is less than or equal to avaialble room in one of the found hotel.

Its an overkill. Here is how it works in general. You show all the records in the db in a table. CSR selects a row in a table and enter the owner to book. That is the basis or room booking. In real, your thinking is exact on to allow the CSR to search on all the 7 fields. But for the scope of project, I think that is not required.

2) It mentioned user configuration should be done via GUI. I assume this is through client GUI with a preference or setting or configuation menu and store these config info to a suncertify.properties file. This will work for a alone mode when client and server are on the same machine. What if the network server and database are on different machine than client (For instance, network server and database are on a solaris box and client is on Windows XP)? How to save those config information to server side? I think both server and client need config information to work properly.

Here is a link that should help you to understand this concept clearly.
suncertify.properties

3) The download just give me an interface definition about database implementation, when I implement this database, can I add more public methods, or should I be constrainted within these small set of interfaces?

You can add any number of methods to the class which implements this interface. But it is not advisable to add methods to the interface itself.

4) What to do with magic cookie in the db file? It is a hex value like 00 00 01 01, even if I verify this value with a db file, it does not necessary meaning a db file is a valid file, does it deserve any attention at all?

It seemed that you are opening it using hex editor as you said in other post. But we have to read the db file using one of the java.io.* package classes or java.nio.* package classes. For example, you can use RandomAccessFile of java.io.* package to read and write data to the file. We are supposed to read and write using the API classes and not using any editor.

5) About Delete flag, should GUI provide any function to delete a record at all? I did not find any requirement on this, but the db file contains this bit. What should I do with it?

You must implement a way to delete the record i.e. by making the flag 1. This is only required in the class that implements given interface. There is no requirement as to provide this functionality in the GUI. You can simply ignore this issue when working with GUI.

6) Startup mode, the assignment requires something like this:
java -jar path_and_filename [<mode>]
mode can be server, alone or left blank.
Here is what the instruction says when left blank:
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 don't know what this means: "in which case the network client and gui must run", does that mean we should treat this as alone mode? I don't think there is any other way to operate this whole thing.
Thanks in advance
Eric
In the link I provided above, George has mentioned another link "Mode Flag confusion". That is a very good post where I think most of your doubts regarding this point should be clarified.

And finally, hope you will have fun and enjoy while doing the project. Good Luck and see you around.
Eric Kim
Ranch Hand

Joined: Feb 21, 2004
Posts: 37
Thanks, but I still don't know how do you save server configuration information from client in a true distributed mode such as this:
Server is running on Solaris.
Client is running on Windows XP.

Perhaps the assignment does not expect this
Satish Avadhanam
Ranch Hand

Joined: Aug 12, 2003
Posts: 697
Hi Kim,
Originally posted by Eric Kim:
Thanks, but I still don't know how do you save server configuration information from client in a true distributed mode such as this:
Server is running on Solaris.
Client is running on Windows XP.

Perhaps the assignment does not expect this

Are you thinking that we are supposed to save configuration in a distributed manner so that client and server can access it? If so, then its not like that. Server and Client has their own configuration files i.e. suncertify.properties file. Our application is supposed to run in three different modes server, as a single application(for local db) and as a client(for remote clients). Say our application starts on computer A, then it stores the configuration(like port number the server is listening, location of db file) required for server operation on the same computer in suncertify.properties file. And the application started on a different computer B in network client mode, then the configuration for running in network client mode(i.e. host name of the server to connect to, port number where server is listening on that particular host) and store the configuration on computer B itself. There is no concept of distributed access of the same propertiese file in the context of exam.
Good Luck.
 
wood burning stoves
 
subject: NX: Assignment questions
 
Similar Threads
suncertify. properties -- Network / non-networked mode
Command Line Argument - Mode Flag
B&S: Mode flag "alone" question
Startup modes
URLyBird 1.2.2 modes