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


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Pass scjd" Watch "Pass scjd" New topic
Author

Pass scjd

davidlong
Greenhorn

Joined: Jan 28, 2001
Posts: 21
Hi all
I passed the assignment with the result 146:
General Considerations(Total 58) 54
Documentation (Total 20) 18
User Interface (Total 24) 22
Server Design (Total 53) 52
It took 10 days for this result after I finished fellow-up exam, but it wasn't too long.
I was very thankful for all of you here. Indeed this site was very helpful site, and I had gained a lot here, althought this is first time I do posting my own.
Hope you all doing well in SCJD project, which really imporve and test your abilities to be java developer.
Thank you all again
David :-)
Dilip kumar
Ranch Hand

Joined: Oct 16, 2000
Posts: 360
Great score...
luis veron
Ranch Hand

Joined: Mar 07, 2001
Posts: 35
Congratulations David!
Just a quick question;
> How many class (.java programs) does your whole assignment have?
> Where did your put your "book a flight" logic, client or in server?
Hope you have a very good career in the future...Thanks
luis
davidlong
Greenhorn

Joined: Jan 28, 2001
Posts: 21
Hi, luis
I am very happy to give me solution for you concerns as below:
1. I had three packages
client: 7 classes
db: 4 origin classes
server 4 classes(RMI approach)
I put "booking logic" in both server and client, which both have some public mothods as required, but I add a special booking methods in those classes.
hope this will help.
david
Maja Vukovic
Greenhorn

Joined: Apr 14, 2001
Posts: 6
David, congratulatons!
Just a follow up question, does that mean that you mean server generic ? I mean does your remote client have acessess to all the public methods of Data class?
Thx
Maja
davidlong
Greenhorn

Joined: Jan 28, 2001
Posts: 21
Hi maja
The answer is yes, except that i did not implement lock/unlock methords in my server system. I left lock/unlock in Data class, and unimplemented anywhere else.
David
ruilin yang
Ranch Hand

Joined: Feb 25, 2001
Posts: 334
Davidlong,
Congradulations to you! Did you have to implement the local access to the data class from the client. If so, would you please explain how you did it ?
I mean your client is allowed to access the dataclass either locally or networked.
Thanks
Ruilin
shailesh sonavadekar
Ranch Hand

Joined: Oct 12, 2000
Posts: 1874
David Long , Congratulations. You have got very good score. All the very best for the future endevours.
David , here I don't want to rain the parade.
PROPER NAMES ARE NOW REQUIRED
Please refer to Official naming policy of javaranch & reregister yourself with Proper First & last name. I think this is a great place for knowledge sharing & you will certainly help maintain the decorum of the forum by reregistering yourself & compling with policy.

Your Friendly Bartender
Shailesh.
david long
Greenhorn

Joined: Apr 16, 2001
Posts: 8
Hi Ruilin
According the spec, you need access the Data class locally, this should be no doult, I think.
What I did was very simple, local access class just implemented the remote interface as the server but without remote exception.
hope this will help
David
missy
Greenhorn

Joined: Mar 27, 2000
Posts: 5
Hi, David
Congrats first!
I got one question for you. Right now, I'm working on the GUI part. I really have the hard time to apply MVC pattern to my GUI. Do i need apply this pattern to all my components? I have used my table model to store data andis already a MVC pattern. What I need to do just use it. Where the MVC should apply? Please give me some idea of your GUI design.
Thanks!!
Missy

Originally posted by david long:
Hi Ruilin
According the spec, you need access the Data class locally, this should be no doult, I think.
What I did was very simple, local access class just implemented the remote interface as the server but without remote exception.
hope this will help
David

david long
Greenhorn

Joined: Apr 16, 2001
Posts: 8
Hi missy
I think all swing components are MVC components, which is no problem. The basic idea, I think, is how we use the advantage of the MVC, rather than to apply the MVC patterns.
However, in order use MVC, you need to implement the model data structure. My solution basiclly like this, a class called TableModel to store and update the table contents, another class called ComboBoxModel to update two ComboBox List. Those two classes all extends the default model class of these two swing components.
Hope this will help
David
[This message has been edited by david long (edited April 16, 2001).]
missy
Greenhorn

Joined: Mar 27, 2000
Posts: 5
Hi, David
Thank so much for your fast reply!
As what i understand your approach, you didn't design YOUR application as MVC pattern but use table model to update data content. Is there any other patterns you used?
One more, how do you understand the following spec:
-------Your user interface should be designed with the expectation of future functionality enhancements, and it should establish a control scheme that will support this with
minimal disruption to the users when this occurs. ------

Thanks in advance!
Missy
Originally posted by david long:
Hi missy
I think all swing components are MVC components, which is no problem. The basic idea, I think, is how we use the advantage of the MVC, rather than to apply the MVC patterns.
However, in order use MVC, you need to implement the model data structure. My solution basiclly like this, a class called TableModel to store and update the table contents, another class called ComboBoxModel to update two ComboBox List. Those two classes all extends the default model class of these two swing components, That is all.
Hope this will help
David

david long
Greenhorn

Joined: Apr 16, 2001
Posts: 8
Hi missy
I used a frame class, which had all GUI components, two model classes to hold all the data that GUI need, and a command class had all fuctionality or commands related event listenners. From this whole picture, you may say I applied MVC architecture in my design, but I would rather to say i used a command design pattern.
Well, the requirement of spec, I thought, was ask us to leave enough room for later enhancement of our GUI design. If this enhancement occured later, the GUI will not supposed change too much, i.e. not so changed that will cause user too much difficult or unconfortable to use the new one (disrupt the user). So you design need leave the enhancement's room in advance. For example, when you add a small button and its fuctionality, the whole picture of GUI should not changed. This is basic design rule applied to all software design.
David

[This message has been edited by david long (edited April 16, 2001).]
Zhi Zhou
Greenhorn

Joined: Apr 18, 2001
Posts: 3
David,
Congrats for your big achievement.
I have a question about the jar package.
I'm going to pack files up to 2 jar files. One client.jar and other is server.jar. suncertify.db package will be included in both jar files. The question is the examer still need to put server.jar in the classpath when the user run in remote mode. Is that right? Do I miss something?
Thanks for your help!
Zhou
Douglas Kent
Ranch Hand

Joined: Oct 06, 2000
Posts: 171
Let me jump in and add congrats...question--how did you identify the connection that placed the lock so another connection could not come in and unlock a lock that it did not place?
thanks in advance...
david long
Greenhorn

Joined: Apr 16, 2001
Posts: 8
Hi Zhou
The packing of two jar files is definitely no problems. I did same as you did. Because sever.jar supposed to run in difference computer or node, you are not able to use class path to get you reference you wanted.
What I did was that client.jar includes also the some classes i needs in suncertify.sever package. Therefore i no need to use the classpath to refer to skb class or other class.
Hi Douglas Kent
I did not identify any connection because lock/unclock are the methods to ensure threads race safe. in order to do this, i just make the Data class only have one instance to all connections by declare static in server.
I could give you the whole set of examples how the method block the other connections below, which may inspire your some thought. Pls note that the example is not thread safe and could not use as real one, it just demonstrate your concerns
inData class:
private static boolean[] lockList= new boolean[recordCount+1];
//above lockList array auto initialized all false;
private static int recordUser=0;
public void lock(int record)throws DatabaseException, InterruptedException{
if(record==0| | record>recourdCount) throw new DatabaseException();// change the IO exception to DatabaseException will make you code ease
//whole database lock, lockList[0] reserved as database lock
if(record==-1) {
while(lockList[0]) //first, set databas lock true as soon as possible
sleep(100);
lockList[0]=true;
while(recordUser!=0) //second, check if any user there
sleep(100);
}
// individual record lock
else {
while(lockList[record] | | lockList[0])
sleep(100);
recoerdUser++;
lockList[record]=true;
}
}
public void unlock(int record){
if(record==0 | | record>recourdCount) return;
if(record==-1)
lockList[0]=false;
else{
recordUser--;
lockList[record]=false;
}
}
In the server, the applying of lock/unlock methods in server side like this;
static Data dt;
......
public DataInfo getRecord( int record) throws DatabaseException, RemoteException{
DataInfo di;
boolean exceptionOccured=false;
try{
dt.lock(record);
di=dt.getRecord(record)
}catch(InterrruptException){
exceptionOccured=true;
}finally{ // very important
dt.unlock(record);
if(exceptionOccured)
throw new DatabaseException(); //all exceptions must be rethrow after unlock method called
}
return di;
}
Remmber this is a demo for how to apply block different connection, it should be no hints or tempting to use it. It need rework to make it thread safe, I did not directly use it in my code.
David

[This message has been edited by david long (edited April 19, 2001).]
shailesh sonavadekar
Ranch Hand

Joined: Oct 12, 2000
Posts: 1874
Missy , Welcome to Javaranch.

PROPER NAMES ARE NOW REQUIRED
Please refer to Official naming policy of javaranch & reregister yourself with Proper First & last name. I think this is a great place for knowledge sharing & you will certainly help maintain the decorum of the forum by reregistering yourself & compling with policy.
Waiting for your new posts with proper first & lastlast name.

Your Friendly Bartender
Shailesh.
Yang Yu
Greenhorn

Joined: Jun 27, 2002
Posts: 8
David. congratulation for past the test.
I failed the first time. plan to work on 2nd submission around 7/4. The breakdown is
General Consideration. Maximum=58 Deductions=11
Documentation: Maximum=20 Deductions=12
GUI: Maximum=24 Deductions=16
Server: Maximum=53 Deductions=0.
I need about 8 more points to pass. I am going to focus on gui & documentation. My initial impression on gui is that the GUI look & feel is not that good. I partitioned the main screen into three parts. The upper left is for searching flight, the lower left is for reserve flight. And right pane is reserved to display the detailed flights information. User will have to search for flights first, in order to reserve a flight, user will have to explicitly double click on a flight on the right display pane. It will then entered how many seats to reserve in lower left "reserveflightpanel" to reserve flights.It seems a bit redundant. Last, my client gui contains 20 files - sometimes, I get too carried away and make class too fine-grained. Can you tell me how do you design your GUI layout.
2. On the documentation. I spent around 10 hrs to work on java doc. Although, I didn't spend sufficient time on design.txt which explains how the server and client gui design. Can you tell me what you did on your documentation. how many files you have and what are the contents of the file.
I know i asked a lot of questions. I will really appreciate for the answer.
Yang Yu
Greenhorn

Joined: Jun 27, 2002
Posts: 8
Oh, David. Left one part on the previous message. When you search for original & destination airport. did you provide the user with the list of abbreviated airport code to choose from.
thank u
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 5274
    
  10

"windsurf",
David hasn't been here in a while... his last post was last year.
Could you please edit your profile so that your display name conforms to the JavaRanch Naming Policy? Thanks for your cooperation.
Junilu
Kevin Li
Greenhorn

Joined: Sep 25, 2001
Posts: 21
Davidlong,
Congradulations to you!
Did you implement the methods that maintain flight info in GUI like add, delete, etc.
Thanks
Kevin
Nagu Rathina
Ranch Hand

Joined: Jun 17, 2002
Posts: 31
David, congrats!! good score!
I have a question. Did u use mutiple db files or only db.db provided by sun? Pl help me.
G.T. Reddy
Ranch Hand

Joined: Jun 25, 2002
Posts: 45
Hi congratulations.
You got good score.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

Most people only use the one db.db file that is provided, that is all you need to meet the requirements. Some people have provided that ability to handle multiple db files, but this won't get you any bonus points. But if you want to include that functionality, it is up to you.
As far as David goes, you will notice his post was in April 2001. Over a year ago.
If you have any more questions, it would be better to post a new thread.
Thanks
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pass scjd