• 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

Pass scjd

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 :-)
 
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Great score...
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"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
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Davidlong,
Congradulations to you!
Did you implement the methods that maintain flight info in GUI like add, delete, etc.
Thanks
Kevin
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
David, congrats!! good score!
I have a question. Did u use mutiple db files or only db.db provided by sun? Pl help me.
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi congratulations.
You got good score.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic