• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

implementation of createRecord and deleteRecord

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm doing the UrlyBird project and the interface provided for the Data class has methods createRecord and deleteRecord. What puzzles me is that there is NO requirement for a user to be able to run these methods.

Should I implement them?
If I need to implement them, can I assume that creating and deleting records is an off-line database maintenance activity and as a result I don't have to worry about threading. In other words there will only be 1 program accessing the database to do these operations?
 
Ranch Hand
Posts: 808
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My assignment is similar. Basically, if the interface has a method, you need to provide implementation for the classes that implement the interface. Otherwise, you would have to declare the implementing class abstract.

If the assignment does not tell you that you must invoke the implemented method, then you don't have to unless you need to invoke such a method to satisfy another "must". Doing more than is required give you no extra points, but it sure gives an opportunity for the judges to knock points off! I wouldn't be surprised if doing extra loses points because "extra" equals "scope creep"...
 
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Joel,

I do agree with Jeff, don�t do any extra work. However I would advice you to provide a correct implementation to all the methods in your interface, although clients won�t use all of them (at least not in this implementation). I did URLyBird as well and if I remember correctly it was a paragraph saying something about designing the application with the expectation of future functionality enhancements.
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My create and delete methods were NOPs and I got full score in Network and Datastore, and only lost 1 point in General Considerations. So I do not think you can lose points for that.

I did get 44/80 for Locking, which could be because my locking strategy does not work if records can be deleted or created. But then, many people got 44/80 and nobody knows why.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic