• Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding methods to DBMain  RSS feed

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Author and ninkuma
Marshal
Posts: 66352
155
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"yogi yogi", please check your private messages.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!