• 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

(URLyBird) Do I need to implement the create & delete methods?

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm bit confused with the existence of method create & delete. I was wondering why it is defined in the supplied interface.

My spec states that the UI for this assignment must satisfy the following criteria:

* Must use Swing.
* Allow user to search the data of all records. (Therefore, I know the purpose of defining the find & read method in the interface.)
* Must present search result in a JTable.
* Must allow user to book a selected record, updating database accordingly. (update method)

Well, that's it. The spec doesn't mention about, for example, creating a functionality where users can add a new record into the database or deleting an existing record.

The spec, does mention that the UI "should be designed w/ the expectation of future functionality enhancements...".
So, I assume that in the end, I still have to create the implementation for the create and delete method.
However, I think It would look weird if these chunk of codes just laying dormant when the application is running, or maybe I just simply miss the reason why
those methods should be defined.

Any clarifications?
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Yudiman,

my assignment says:


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


and then an interface follows with create & delete method. so my data-class should implement these methods (otherwise it wouldn't compile).

now the question is: is throwing an UnsupportedOperationException also an implementation? i think it's a valid choice but document certainly document this decision.

i did implement both create and delete, because implementation is not hard at all, so why risking an automatic failure...
 
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Making version 1.3.3:

I will provide implementation to Data-class. I will not provide funktionality to GUI.
 
Yudiman Kwanmas
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I see, then I will do both methods, and but won't provide the gui implementation.
 
Jari Timonen
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Yudiman Kwanmas wrote:I see, then I will do both methods, and but won't provide the gui implementation.



Yep, that's what version UB 1.3.3 specs say.
 
No holds barred. And no bars holed. Except this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic