Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Should I remove those search criterion other than name+location

 
lambertlee Li
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my requirement, I only required to provided the search based on user input of name and/or location, but I also providing the search criterion based on user input of specialties and rates. Not sure if need to remove them. Guys, any idea? Just wonder if just leave it there good or not? I knew that no extra point on this additional feature.

hesitating because:
(1)codes are there, don't want to change anymore
(2)search based on specialties and rates may get error since no fully test there. Just some simple test. If error came out in this part, I sure will lost mark. Am I doing that stupid thing like moving a rock and hit my own feet. That is not worthy right?
 
Edwin Dalorzo
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be very careful with your interpretation of the instructions.html file.

My URLyBird assignment says:

"It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user"

I am letting the user search for any combination of records using the findByCriteria implementation using OR as the conditional operator. This kind of search does not require exact matches.

On the other hand, the search by name OR location requires exact matches.
[ October 18, 2006: Message edited by: Edwin Dalorzo ]
 
Jeremy Botha
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Edwin.

I interpreted that line from my B&S slightly differently; I believe it means I must either allow the user to list all the records, or just those where (name.startsWith(searchTerm) || location.startsWith(searchTerm)) is true. I base this on the following extract from the interface I was required to implement:



I've also included support for searching across all fields.
 
lambertlee Li
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Edwin,

thanks for your reply. Yes, my assignment also mention should providing user search on all records. I have implemented this by providing a separate button to allow user to list/view all the records. This is my understanding of "It must allow the user to search the data for all records". Is my understanding right?
 
josine wilms
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kaymen,

Been there.

You have find functionality described in user interface section AND find() in DB interface section. These don't fit together. Try to draw the picture.

- Not all methods are going to be used in the final application by your users.
(But are nice for testing purposes for yourself, like create() method).
- All methods have to work in the final application.

It's a bit of a puzzle, because you would think the specs would be more clear described but they are not. It's like a prism in some ways this SCJD.

 
paul seldon
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"It must allow the user to search the data for all records, or for
records where the name and/or location fields exactly match values
specified by the user."


search the data for all fields, then what you are concerning is correct.
you can enter size for search, etc... all the field name would be there.
But, not field but records.

I can search all the records with name and/or location because those are the primary key of the database.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic