• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX SCJD: but passed with 155/155

 
shan chen
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just get test result. I took the new version assignment, but the grade was given as the old version. Thanks to all the helps I got from this forum! Follwoing is the detailed comments:

This report shows the total points that could have been awarded in each section and the actual number of points you were awarded. This is provided to give you per-section feedback on your strengths. The maximum possible number of points is 155; the minimum to pass is 124. Section Summary Report: General Considerations: Maximum=58 Deductions=0 Actual=58 Documentation: Maximum=20 Deductions=0 Actual=20 GUI: Maximum=24 Deductions=0 Actual=24 Server: Maximum=53 Deductions=0 Actual=53 Total: Maximum=155 Deductions=0 Certification Score=155

shan
 
Lanuk Jajab
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great job! a perfect score!
 
Billy Tsai
Ranch Hand
Posts: 1304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which new assignment did you do?
do you see the SCJD result directly after you login to the certmanager site?
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nice Job! I'm moving this to the Cert results forum, so everyone can appreciate it.

M
 
Francis Siu
Ranch Hand
Posts: 867
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wowwwwwwww..
Perfect
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats Shan. Great job.
Mark
 
shan chen
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Billy Tsai,
which new assignment did you do?

My assignment is URLyBird, hotel room booking project.

do you see the SCJD result directly after you login to the certmanager site?

Yes.
shan
 
Ravi Arikere
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations!!!
 
George Fung
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulation.
Could you please share your desing pattern here? Do you use conncetion factory and lock manager?
 
shan chen
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Grorge,
Could you please share your desing pattern here?

I would like to share my experience. In choices.txt, I indicated that I used three design patterns:
1. MVC
The pirpose is to separate the data display from the actual data representation. The view is implemented by the main window in ClientApplication.java, the controller is implemented by GUIController.java, the data model is implemented by String array, and the data access is implemented by DBMain.
The ClientApplication has a reference to GUIController, and GUIController has a reference to DBMain. Briefly, the structure is :
main window --> controller --> data model

2. Adapter
Adapter pattern is used to handle the problem that DBMain can not be bounded to the RMI registry.(There are many disscussions about this issue and my solution is just one of them).
I used an adapter RemoteDBAdapter to wrap DBMain. RemoteDBAdapter implementes RemoteDBMain. RemoteDBMain extends Remote. RemoteDBMain has all methods defined in DBMain , except each method throws RemoteException. In this way, RemoteDBAdapter can be bounded to RMI registry as the remote object.
At the client side, I used ClientDBAdapter as an adapter to wrap RemoteDBMain to DBMain. Thus, the data access class is always DBMain in both modes.
3. Factory
With the help of Adapter pattern, I defined method getDBAccess to create data access object of type DBMain for both network mode and non-network mode.
public static DBMain getDBAccess ( ) throws IOException {
if local mode:
return local data access;
if remote mode:
return remote data access;
}

Do you use conncetion factory and lock manager?

I used connection factory, as I explained in factory pattern.
No, I did not used lock manager.
Hope these are helpful.
shan
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11945
212
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow. Fantastic score. Congratulations.
 
Maksim Golubkow
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi shan,
Congratulations, well done.
One question, have you data validation (such as owner id must be 8 digit number) in the methods updateRecord(...) and createRecord(...)?
Regards, Maksim
 
George Fung
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks your info. I will follow your design.. Congratulation
 
shan chen
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Andrew,
You gave me many help too. Thanks a lot. Good luck to your test result!

Hi, Maksim,
have you data validation (such as owner id must be 8 digit number) in the methods updateRecord(...) and createRecord(...)?

Yes, I validated owner id to be an 8-digit number BEFORE it is passed as a parameter to any methods. I used WholeNumberField.java which extends JTextField to input owner id when booking a room. WholeNumberField uses PlainDocument to ensure the input is an 8-digit number.
Following are two threads about this topic:
http://www.coderanch.com/t/241875/java-programmer-SCJP/certification/set-maximum-input-length-JTextField
http://www.coderanch.com/t/183397/java-developer-SCJD/certification/NX-maximum-input-length-JTextField

Hope these are helpful.
shan
 
Damian Ryan
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done, SCJD!
 
Maksim Golubkow
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi shan, thanks for reply, but what i mean is following:

Regards, Maksim
 
shan chen
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Maksim,
Sorry that I have misunderstood your question. In my application, method update in Data.java does not check the parameter. My reason is: only the owner_id field is changed when method update is called to book a room (my JTable is not editable). As the owner id is guarrented to be an 8-digit number with the help of PlainDocument, method update does not have to check it again.
It is good to check data in method update, while in my personal opinion, I prefer to validate data on client side if possible.
Regards.
shan
 
Maksim Golubkow
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks shan, that helps me.
Regards, Maksim
 
ChunChhau Liao
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just perfect!!!
Congratulations

ChunChhau Liao
SCJP 1.4
SCWCD
 
Tong Chen
Ranch Hand
Posts: 1011
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations to you!
 
Chin Ho Tan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you cache your records ? Or you just do "search" from the file directly ?
 
Vlad Rabkin
Ranch Hand
Posts: 555
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shan,
Waw: 100%. Congratulations!
Could please help me and answer 3 question:
Question 1
Could please describe you synchronization design (to guarantee data consistency):
1) Do you lock the record to read on the client also:
lock()-read()-lock() to read
lock()- read()-write()-unlock() to update
or
2) you don't lock() to read, but you synchronize all read/write methods in DBMain.
read() to read
lock()- read()-write()-unlock() to update?
Question 2
You said you use Data Model (represented by String[]).
Does it mean that you have a DataModel for each record?
How you class look like 1) or 2)

Could you describe more precisly what you meant?
Question 3
Did you do something do prevent client from been changed in case database structure changes (columns in database would be added, deleted, or replaced)? If so, what have done to prevent changes on clients if it occurs?
Many thanx,
Vlad
[ September 18, 2003: Message edited by: Vlad Rabkin ]
[ September 18, 2003: Message edited by: Vlad Rabkin ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic