wood burning stoves*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes (URLyBird) Do I need to implement the create & delete methods? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "(URLyBird) Do I need to implement the create & delete methods? " Watch "(URLyBird) Do I need to implement the create & delete methods? " New topic
Author

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

Yudiman Kwanmas
Greenhorn

Joined: Feb 01, 2009
Posts: 13
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?
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5126
    
  12

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...


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Jari Timonen
Ranch Hand

Joined: Jan 16, 2004
Posts: 230
Making version 1.3.3:

I will provide implementation to Data-class. I will not provide funktionality to GUI.


SCJP 5.0, SCJD URLyBird 1.3.3, OCMJEA 5 (SCEA) Factory Homes
Yudiman Kwanmas
Greenhorn

Joined: Feb 01, 2009
Posts: 13
I see, then I will do both methods, and but won't provide the gui implementation.
Jari Timonen
Ranch Hand

Joined: Jan 16, 2004
Posts: 230
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.
 
jQuery in Action, 2nd edition
 
subject: (URLyBird) Do I need to implement the create & delete methods?
 
Similar Threads
User Requirement
Questions about limited functionality
NX: Questions about URLyBird 1.3.2
Urlybird 1.1.1
Query regarding update functionality in UI