• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,

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.

Conan
 
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Regards,
Darya
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic