aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Assignment Search Criteria - Auto Failure 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 "Assignment Search Criteria - Auto Failure" Watch "Assignment Search Criteria - Auto Failure" New topic
Author

Assignment Search Criteria - Auto Failure

Daniel Chevelle
Greenhorn

Joined: Aug 15, 2006
Posts: 4
Hey all,

please let me know if you think this is an auto-failure..

Req: "It must [the UI] allow the user to search the data for records where the name and/or location fields exactly match values specied by the user."

In my assignment, i'm provided some smarts to the search functionality..for instance my search code is case in-sensitive and will match a value if it starts with the value entered by the user.

so entering aus would match Australia.

I'm worried that this violates the 'exact match' part of the assignment. Do you think i'm taking that sentence too literally? Your advice would be helpful.

I plan to submit this week.

Kind Regards

Daniel
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
why take the risk?


42
Daniel Bryant
Ranch Hand

Joined: Jul 15, 2006
Posts: 54
Hi Daniel.

Welcome to the Ranch...

With regard to your question

In my assignment, i'm provided some smarts to the search functionality..for instance my search code is case in-sensitive


I agree with Jeroen - you're taking a risk here, but if you document you thoughts on the subject in the choices.txt you probably would get away with this.

and will match a value if it starts with the value entered by the user.


I think this is an auto-fail. My spec says the server MUST perform a search where a record is returned if a field String starts with the associated criteria String (what you are proposing), but my client-side spec states that only an EXACT match for the fields MUST be returned.

Many posts I've read on the Ranch believe that Sun have deliberately given you different search specs for client and server in order to see if you have read and understood the requirements.

I know it could be argued that you are helping out your users by providing better functionality, but I don't think it's worth deviating from the given specs (and if in doubt I usually think about what I do in the real world - here in a real project I wouldn't add functionality to a search algorithm/mechanism if the client had signed-off, but I probably would mention this as an possible addition)

Best wishes,

Daniel
[ August 16, 2006: Message edited by: Daniel Bryant ]

SCJP 1.4,<br />SCJD (URLyBird 1.2.1, JDK 5.0)
Oricio Ocle
Ranch Hand

Joined: Nov 30, 2004
Posts: 284

I'm worried that this violates the 'exact match' part of the assignment

Sure it violates, if you change behaviour of the specified interface.
But it's acceptable if you implement it at business layer.

Regards


SCJP, OCMJD, OCMJEA
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
What I did was implement both and expose only the exact match through the client (though it could be rapidly changed to use the other match by changing a single flag in a single method).
Daniel Massie
Greenhorn

Joined: Jan 08, 2005
Posts: 28
Originally posted by Jeroen T Wenting:
What I did was implement both and expose only the exact match through the client (though it could be rapidly changed to use the other match by changing a single flag in a single method).


I took the same approach. Doing this means that you satisfy both the requirements of the data class and the requirements of the client.
Daniel Dalton
Ranch Hand

Joined: Mar 20, 2005
Posts: 146
I used a couple of radio buttons on the GUI to select between starts with and exact matching. That way, it allows a picky examiner to carry out an exact match if they want to. The interface specified that the Data class should do a "starts with" search, so it was easy to filter those that didn't "exactly" match.

However, I left everything case sensitive. That's because the Data class had to implement the supplied interface and making it case-insensitive would mean that potentially the search method would return too many records. While you can filter these in YOUR application, someone else using your Data class may not expect that behaviour. In other words, it could be argued that you haven't implemented the interface correctly - and I didn't want to take that risk!
Daniel Chevelle
Greenhorn

Joined: Aug 15, 2006
Posts: 4
Excellent replies. I completely agree with the arguments raised. Thanks all.

Especially to all the Daniels who posted
Roy Mallard
Ranch Hand

Joined: Jul 14, 2005
Posts: 53
My string entry fields have a "case sensitive" checkbox and an "exact match" (i.e. not substring match) checkbox.


SCJP 1.4<br />SCJD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Assignment Search Criteria - Auto Failure