• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B & S find criteria is not realistic

 
Norbert Hasselberg
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the submission : A non-null value in criteria[n] matches any field
// value that begins with criteria[n]. (For example, "Fred"
// matches "Fred" or "Freddy".)
In the database schema we have the specialties field. what is, when i am looking for plumber and the spec "plumber" is located at the end of this field ? for example the field contains : "car washer; plumber". with the search criteria from the submission you will never find this record. I think, especially for the specs field, we don't need the search with .startsWidth() , but with .contains !
what sould i do ?
 
Jacques Bosch
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Norbert.
IMHO, don't worry about it. Just implement that find method as they told you to. Be careful of not making things more complicated than they need to be. It's not a real system.
J
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Norbert,
You're right the project is not realistic, it is in fact a certification exam and is therefore as artificial as any kind of test. As a test you will be graded on how well you implement the requirements present in the assignment instructions. You will not be rewarded by attempting to expand the requirements to make the exam look more like a real project. In a real project your instincts are laudable, here they will lead you to do much more work than is necessary in order to succeed. Perversely, you may even be penalized if there are any problems with the implementation of any non-required functionality you provide.
So, what's the best way to implement the search capability for the specialities field? My answer is not to implement it since it cannot be traced back to any specific requirement present in the assignment instructions. Try not to embellish the existing requirements. There's an existing requirement to provide a search capability for the name and location fields. You should provide the best solution you know how to this requirement. You should restrain your common sense telling you that it makes sense to do the same thing for all the other fields in the database. It does make sense, and in a real-world project you should think about things like this, but remember this is a certification exam.
Another way to think about this that may make you feel better. If the examiner sees that you have well implemented the search capability for the name and location fields (as required) he will have no doubt that you could have implemented the same capability for the other fields (if and when you were required to do so). But won't the examiner look more favorably on a submission that implements searching for all database fields instead of just the required fields? Not necessarily. One of the aspects of development that you are being graded on is the ability to understand requirements. Implementing a solution that is above and beyond the requirements is not necessarily doing a superior job than implementing a solution that solves the actual requirements specified in the assignment instructions. Sun is trying to save you doing extra (and unnecessary) work. Put the time you save not doing the extra work into making certain that your existing code is well implemented. Any time saved by not going above and beyond the scope of the project should be used to test the project code. Extra credit doesn't exist for this exam, so it can't mitigate any failure to have a well implemented solution to the actual requirements.
It's not always an easy to task to understand the requirements. You have to use your own judgment and experience. You can also avail yourself of the judgment and experience that can be found in this forum. I think I'm on fairly firm ground stating that if you discover a requirement lurking in the assignment instructions that no one else has previously found that what you believe to be a requirement is probably a figment of an active imagination. What Robert Hutchins said about exercise is probably equally good advice about expanding the requirements for this exam:
Whenever I feel like exercise I lie down until the feeling passes.

I encourage you to read the following which I think offers a good way to think about the project:
Sun Certified Developer for Java 2 Platform (Step 1 of 2)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic