jQuery in Action, 3rd edition
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes B&S:  Do Graders Unit Test Server?? (or, Why Add/Delete?) 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 "B&S:  Do Graders Unit Test Server?? (or, Why Add/Delete?)" Watch "B&S:  Do Graders Unit Test Server?? (or, Why Add/Delete?)" New topic

B&S: Do Graders Unit Test Server?? (or, Why Add/Delete?)

Jack Gold
Ranch Hand

Joined: Feb 04, 2005
Posts: 85
Just wondering if the graders perform any unit testing on Data.java?

The reason I ask is that DBAccess specifies add and delete functionality that does not seem to be a requirement of the GUI application.

I implemented these methods in Data, and I currently have add/delete buttons in the UI, (and will probably remove them).

The reason this is imortant is that the one scenario that could trip up my locking is if userB deletes a record and then creates a new one (thus reusing space), User A may have a handle to the original record but end up modifying a differnt record.

Of course, if add/delete are not available from the UI, then this is a non-issue.

OTH, if there is no add/delete functionality, then a large portion of work on the server goes untested.

Opinions on the intent and scope of these requirements?

SCJP 1.4<br />SCJD <br />SCWCD (Studying)
Kai Witte
Ranch Hand

Joined: Jul 17, 2004
Posts: 356
Originally posted by Jack Gold:

Opinions on the intent and scope of these requirements?

yes. I think that they introduced these issues to test if you are capable of recognizing that certain things are not a requirement that seem to be a requirement at a first glance. So you can make the best impression if you don't implement those methods and throw an UnsupportedOperationException. Remember to declare the methods "optional" in the javadoc of the interface as well. I read many reports from people who made it so. They all passed with high scores.

If you implement those methods then do it well: Provide unit tests, and fix your locking issues.


Kai Witte's business website Kai Witte's private homepage
Darya Akbari
Ranch Hand

Joined: Aug 21, 2004
Posts: 1855
Hi Jack,

as far as I've seen here at the SCJD forum one must implement the provided interface.

I think you have a similar statement in your assignment. My assignment (B&S version 2.1.3) for example says:

Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface:

package suncertify.db;

public interface DB

From a client view you only need to implement the book (update) method but from a database server view you should implement the whole interface since this is something one can really test against without concerning about the client implementation.

I also wasn't sure about it but decided to be on the safe side and implemented also the add/delete methods.


I agree. Here's the link: http://aspose.com/file-tools
subject: B&S: Do Graders Unit Test Server?? (or, Why Add/Delete?)
It's not a secret anymore!