aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Code complexity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Code complexity" Watch "Code complexity" New topic
Author

Code complexity

Martin Vanyavchich
Ranch Hand

Joined: Sep 16, 2008
Posts: 241
Hey guys,

I have some questions about codeing for the asignment.

1.) Do you think al lot of boilerplate code affects the score, since it could be interpreted as unecessary nesting depth increasement?
2.) All this Exception handling seems to be poluting methods and constructors signatures. For example, the constructor for my hotel room DTO:


Since there is a lot of parsing from strings a lot can go wrong. Are all those exceptions an overkill?

Any help will be appreciated


SCJP 6, OCMJD 6, OCPJWSD 6
I no good English.
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5609
    
  15

1/ having a lot of boilerplate code is never a good thing

2/ Only the ParseException is a checked exception, all other exceptions should not occur in a well-developed application (and thus should not be caught anywhere). I decided not to parse dates and just handle them as string (which removes the need of handling/declaring the ParseException)


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Code complexity