wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Adding methods to DBMain 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 "Adding methods to DBMain" Watch "Adding methods to DBMain" New topic
Author

Adding methods to DBMain

Sean Beecroft
Greenhorn

Joined: Dec 28, 2007
Posts: 26
For the purpose of making the code cleaner, I was thinking about deprecating methods in DBMain and then adding new ones that are more object oriented. I know I could be adding scope, but there are requirements to "be nice" to Junior developers and make the code easy to understand. Anyone have any ideas?


SCJA | SCJP | SCJD | SCMAD | SCEA(Underway...)
William Smith II
Ranch Hand

Joined: Apr 26, 2007
Posts: 39
I wouldn't do it. Sun asked you to implement DBMain, so you do so. Besides, it's likely that the examinor will put your Data class through a set of tests (may include load tests), and if you deprecate methods, then the examinor will get results that weren't what he/she was expecting.
Sean Beecroft
Greenhorn

Joined: Dec 28, 2007
Posts: 26
I choose not to alter the DBMain but instead to deprecate Data class. It still has the same functionality, it is just deprecated. Also I haven't changed the interface. My code looks 10x cleaner and easier to read now.
William Smith II
Ranch Hand

Joined: Apr 26, 2007
Posts: 39
My assignment stated "Your data access class must be called "Data.java""

So in my opinion, you are not meeting the "must" requirement. Or I don't understand what you're doing.
Sean Beecroft
Greenhorn

Joined: Dec 28, 2007
Posts: 26
That is a good point. Mine says the same thing. I will have to think about that. I have a bunch of JUnit tests that still can pass.

I've just done a OO wrapper with classes like Database Record Key Field Metadata and so on. I did this to AID me during the next phase of the development. It is not a ton of code, but it makes the application so much easier to write / read / expand / use.

As I understand it we get points for General considerations (100). Deprecating Data may be incorrect. I'll have to re-examine it I guess.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

"yogi yogi", please check your private messages.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Adding methods to DBMain
 
Similar Threads
DuplicateKeyException
remote exception
Adds new methos to BDMain
URLyBird: Use of intermediate interface
About stop the RMI server